[SDL] SDL in a Client Window
Mason Wheeler
masonwheeler at yahoo.com
Wed Dec 10 06:31:44 PST 2008
>----- Original Message ----
>From: Walt Niehoff <wniehoff at stny.rr.com>
>Subject: Re: [SDL] SDL in a Client Window
>
>Mason appears to be on top of the basic requirement: pass in a window handle
>and get an SDL surface in the window. I think it's acceptable for SDL to
>handle all events in that window, although I won't claim to have thought this
>through.
>
>Walt
Hoo boy. No, you haven't. This is one of my biggest gripes about SDL 1.2: that
SDL_Video is so tightly coupled with SDL_Event processing. I'd love to see the
two separated. It would be especially bad to have SDL try to handle input if I
embed an SDL surface in a GUI form that I've created in Delphi, because Delphi's
Application object *also* takes over input handling for any windows you create.
Ideally, SDL_Events should be its own subsystem, completely independent of
SDL_Video. If that's not possible for some reason, there should at least be a
specific exception for windows that SDL didn't create itself: If you set it up in an
existing window, assume that that window already has control of event handling
and don't try to take over. Perhaps provide an API option to allow it to take over
if the programmer decides that would be appropriate in this case?
More information about the SDL
mailing list