Support for arbitrarily-shaped transparent window cutouts

Hi all - I’m new to SDL and this forum. I’m investigating using SDL (indirectly) for a specific application and have a few questions:

(1) Does SDL 2.0 include the new SDL_SetWindowShape API that I’ve read about;

(2) Am I right to understand that SDL_SetWindowShape will allow arbitrarily-shaped “cutouts” in any window, e.g. a circle in the center of the screen, that allow whatever other program is running underneath to show through?

(3) This will work on Windows 7, i.e. SDL_SetWindowShape will essentially map to the Windows support for this functionality using the TransparencyKey functionality or something other native API?

(4) When will SDL 2.0 be released?

Thanks for any help or insight on any of these questions! :slight_smile:

  1. Yes
  2. Yes
  3. Yes
  4. It’s basically at a shippable point now, but I’m too busy working on
    games and Valve stuff to officially release it. At this point, grab a
    build, if it works for you, use it! If it doesn’t, report a bug and poke
    me and/or Ryan until it’s fixed. Or even better, submit a patch!On Thu, Nov 1, 2012 at 1:47 PM, Ghopper21 wrote:

**
Hi all - I’m new to SDL and this forum. I’m investigating using SDL
(indirectly) for a specific application and have a few questions:

(1) Does SDL 2.0 include the new SDL_SetWindowShape API that I’ve read
about;

(2) Am I right to understand that SDL_SetWindowShape will allow
arbitrarily-shaped “cutouts” in any window, e.g. a circle in the center of
the screen, that allow whatever other program is running underneath to show
through?

(3) This will work on Windows 7, i.e. SDL_SetWindowShape will essentially
map to the Windows support for this functionality using the TransparencyKey
functionality or something other native API?

(4) When will SDL 2.0 be released?

Thanks for any help or insight on any of these questions! [image: Smile]


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

To add to #4: I’d say you can start using SDL 2.0 now safely. There
are still some bugs around, but it’s mostly usable by this point. So
far I didn’t have any big issues other than the fullscreen in X issue,
and that’s really more of an issue with X than with SDL.

2012/11/2 Sam Lantinga >

  1. Yes
  2. Yes
  3. Yes
  4. It’s basically at a shippable point now, but I’m too busy working on
    games and Valve stuff to officially release it. At this point, grab a
    build, if it works for you, use it! If it doesn’t, report a bug and poke me
    and/or Ryan until it’s fixed. Or even better, submit a patch!

On Thu, Nov 1, 2012 at 1:47 PM, Ghopper21 wrote:

Hi all - I’m new to SDL and this forum. I’m investigating using SDL
(indirectly) for a specific application and have a few questions:

(1) Does SDL 2.0 include the new SDL_SetWindowShape API that I’ve read
about;

(2) Am I right to understand that SDL_SetWindowShape will allow
arbitrarily-shaped “cutouts” in any window, e.g. a circle in the center of
the screen, that allow whatever other program is running underneath to show
through?

(3) This will work on Windows 7, i.e. SDL_SetWindowShape will essentially
map to the Windows support for this functionality using the TransparencyKey
functionality or something other native API?

(4) When will SDL 2.0 be released?

Thanks for any help or insight on any of these questions!


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Sam Lantinga wrote:

  1. Yes2) Yes
  2. Yes
  3. It’s basically at a shippable point now, but I’m too busy working on games and Valve stuff to officially release it. ?At this point, grab a build, if it works for you, use it! ?If it doesn’t, report a bug and poke me and/or Ryan until it’s fixed. ?Or even better, submit a patch!

Wow – that’s music to my ears. Thanks for the quick reply.

Incidentally, to give some context for my question – I’m actually trying to get transparent cutout windows in Kivy, the Python NUI framework. Kivy uses Pygame for a number of screen/windowing services, and as you know Pygame currently uses SDL 1.2. So SDL 2.0 with SDL_SetWindowShape --> Pygame 2.0 --> Kivy supporting cutouts (with some tweaks)!