SDL_QUIT message

SDL_QUIT doesn’t seem to be used much by SDL 1.3 except for
compatibility with 1.2. It has mostly been replaced by
SDL_WINDOWEVENT / SDL_WINDOWEVENT_CLOSE.

Also, I see it in SDL_HandleSIG in SDL_Quit.c, but my understanding is
that this event is supposed to signal a request to quit, not that the
application must quit… (of course, the signal handler’s disabled
anyway, since SDL_InstallParachute does nothing).

Perhaps SDL_QUIT should be wrapped by SDL_NO_COMPAT.

A similar event might be useful to indicate when the system is
shutting down, or other times when the system demands rather than
asking nicely.

SDL_QUIT doesn’t seem to be used much by SDL 1.3 except for
compatibility with 1.2. ?It has mostly been replaced by
SDL_WINDOWEVENT / SDL_WINDOWEVENT_CLOSE.

Also, I see it in SDL_HandleSIG in SDL_Quit.c, but my understanding is
that this event is supposed to signal a request to quit, not that the
application must quit… (of course, the signal handler’s disabled
anyway, since SDL_InstallParachute does nothing).

Perhaps SDL_QUIT should be wrapped by SDL_NO_COMPAT.

SDL_QUIT is part of an enumeration so wrapping it in SDL_NO_COMPAT
would change the SDL ABI by changing the values of all the elements in
the enumeration that follow that entry. It could be replaced with a
different value, some thing like SDL_UNUSED to preserve the
enumeration values. It is also still used in some of the code and a
lot of test programs.

In general I think it should stay around. OTOH, I’m not committed to
its existence.

I’m the one who stuck SDL_NO_COMPAT in the code in the first place. I
wanted a way to be sure I was playing SDL 1.3 and not an emulation
layer. When I did it I found a few other things that I wanted to cut
out, but that needed to be carefully examined before they could be cut
out. Now that development is focused on SDL 1.3 I think SDL_NO_COMPAT
may see more use.

Obviously, I think having SDL_NO_COMPAT is not just handy, but very
important to people learning SDL 1.3 and to people porting 1.2 apps to
1.3. So, please, report anything that you think should be chopped out
by SDL_NO_COMPAT.

Bob PendletonOn Sat, Nov 7, 2009 at 11:20 PM, Kenneth Bull wrote:

A similar event might be useful to indicate when the system is
shutting down, or other times when the system demands rather than
asking nicely.


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


±----------------------------------------------------------

2009/11/9 Bob Pendleton :

SDL_QUIT is part of an enumeration so wrapping it in SDL_NO_COMPAT
would change the SDL ABI by changing the values of all the elements in
the enumeration that follow that entry. It could be replaced with a
different value, some thing like SDL_UNUSED to preserve the
enumeration values. It is also still used in some of the code and a
lot of test programs.

You could also use something like this (which avoids defining an
additional symbol):

SDL_JOYBUTTONDOWN,
SDL_JOYBUTTONUP,
#ifndef SDL_NO_COMPAT
SDL_QUIT,
#endif
SDL_SYSWMEVENT = 16, /* or SDL_JOYBUTTONUP+2 */
SDL_PROXIMITYIN,

Another option, is to move it to just before SDL_USEREVENT (which is
already set to 24).

In general I think it should stay around. OTOH, I’m not committed to
its existence.

I see a use for a message to say the application must quit, but
SDL_QUIT is supposed to request (not require) that the application
quit. Right now, there’s nothing that would trigger a request to quit
that isn’t already covered by other events.> I’m the one who stuck SDL_NO_COMPAT in the code in the first place. I

wanted a way to be sure I was playing SDL 1.3 and not an emulation
layer. When I did it I found a few other things that I wanted to cut
out, but that needed to be carefully examined before they could be cut
out. Now that development is focused on SDL 1.3 I think SDL_NO_COMPAT
may see more use.

Obviously, I think having SDL_NO_COMPAT is not just handy, but very
important to people learning SDL 1.3 and to people porting 1.2 apps to
1.3. So, please, report anything that you think should be chopped out
by SDL_NO_COMPAT.

I want to keep around SDL_QUIT to indicate that the user requested
that the application close, not just that a specific window should
close. It may not see much use and be dropped, but I think it may see
more play in the future.On Sat, Nov 7, 2009 at 9:20 PM, Kenneth Bull wrote:

SDL_QUIT doesn’t seem to be used much by SDL 1.3 except for
compatibility with 1.2. ?It has mostly been replaced by
SDL_WINDOWEVENT / SDL_WINDOWEVENT_CLOSE.

Also, I see it in SDL_HandleSIG in SDL_Quit.c, but my understanding is
that this event is supposed to signal a request to quit, not that the
application must quit… (of course, the signal handler’s disabled
anyway, since SDL_InstallParachute does nothing).

Perhaps SDL_QUIT should be wrapped by SDL_NO_COMPAT.

A similar event might be useful to indicate when the system is
shutting down, or other times when the system demands rather than
asking nicely.


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


-Sam Lantinga, Founder and President, Galaxy Gameworks LLC

Sam Lantinga wrote:

I want to keep around SDL_QUIT to indicate that the user requested
that the application close, not just that a specific window should
close. It may not see much use and be dropped, but I think it may see
more play in the future.

SDL_QUIT still seems useful under OS X, where most applications keep
running even after their last window is closed. Especially if SDL can
translate the command-q shortcut into an SDL_QUIT event.–
Rainer Deyke - rainerd at eldwood.com