SFML community forums
General => Feature requests => Topic started by: mrjnewt on August 26, 2010, 10:22:34 pm
-
I've looked over the documentation and haven't been able to find anything which supplies this functionality, so here goes. I'd like to request the addition of a function analogous to SDL's SDL_GetWMInfo (which returns the structure described here: http://sdl.beuc.net/sdl.wiki/SDL_SysWMInfo).
Why this is important:
With access to the display pointer and window (X11) or window handle (Windows), individuals can implement important functionality such as drag'n'drop, copy and paste, window shaping/transparency, etc. This removes the burden from SFML to build these things in.
Implementation difficulty:
Simple. SFML already manages this information behind the scenes; the addition of one function and one class would suffice.
Regards,
Justin
-
You can already get the Window Handle in SFML2 with this: http://sfml-dev.org/documentation/2.0/classsf_1_1Window.htm#bb22a285fe50ad45d61cc149240de5d3
-
Great, I was searching the classes list and the WindowHandle class isn't documented. Is there any way to get the X11 display pointer? As I understand it, many X11 function require both the window and display handles.
-
I think you can use your own display, it doesn't have to be the one SFML uses. That's what SFML does when you create a sf::Window from a X11 window handle; so far it works fine.