slouken@0: /* slouken@5535: Simple DirectMedia Layer slouken@9619: Copyright (C) 1997-2015 Sam Lantinga slouken@0: slouken@5535: This software is provided 'as-is', without any express or implied slouken@5535: warranty. In no event will the authors be held liable for any damages slouken@5535: arising from the use of this software. slouken@0: slouken@5535: Permission is granted to anyone to use this software for any purpose, slouken@5535: including commercial applications, and to alter it and redistribute it slouken@5535: freely, subject to the following restrictions: slouken@0: slouken@5535: 1. The origin of this software must not be misrepresented; you must not slouken@5535: claim that you wrote the original software. If you use this software slouken@5535: in a product, an acknowledgment in the product documentation would be slouken@5535: appreciated but is not required. slouken@5535: 2. Altered source versions must be plainly marked as such, and must not be slouken@5535: misrepresented as being the original software. slouken@5535: 3. This notice may not be removed or altered from any source distribution. slouken@0: */ slouken@0: slouken@1895: /** slouken@3407: * \file SDL_quit.h slouken@7191: * slouken@3407: * Include file for SDL quit event handling. slouken@1895: */ slouken@0: slouken@0: #ifndef _SDL_quit_h slouken@0: #define _SDL_quit_h slouken@0: slouken@1356: #include "SDL_stdinc.h" slouken@1358: #include "SDL_error.h" slouken@1356: slouken@3407: /** slouken@3407: * \file SDL_quit.h slouken@7191: * slouken@3407: * An ::SDL_QUIT event is generated when the user tries to close the application slouken@3407: * window. If it is ignored or filtered out, the window will remain open. slouken@3407: * If it is not ignored or filtered, it is queued normally and the window slouken@7191: * is allowed to close. When the window is closed, screen updates will slouken@3407: * complete, but have no effect. slouken@3407: * slouken@3407: * SDL_Init() installs signal handlers for SIGINT (keyboard interrupt) slouken@3407: * and SIGTERM (system termination request), if handlers do not already slouken@3407: * exist, that generate ::SDL_QUIT events as well. There is no way slouken@3407: * to determine the cause of an ::SDL_QUIT event, but setting a signal slouken@3407: * handler in your application will override the default generation of slouken@3407: * quit events for that signal. slouken@7191: * slouken@3407: * \sa SDL_Quit() slouken@3407: */ slouken@0: slouken@0: /* There are no functions directly affecting the quit event */ slouken@3407: slouken@0: #define SDL_QuitRequested() \ slouken@5553: (SDL_PumpEvents(), (SDL_PeepEvents(NULL,0,SDL_PEEKEVENT,SDL_QUIT,SDL_QUIT) > 0)) slouken@0: slouken@0: #endif /* _SDL_quit_h */