00001 /* 00002 SDL - Simple DirectMedia Layer 00003 Copyright (C) 1997-2009 Sam Lantinga 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Lesser General Public 00007 License as published by the Free Software Foundation; either 00008 version 2.1 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Lesser General Public License for more details. 00014 00015 You should have received a copy of the GNU Lesser General Public 00016 License along with this library; if not, write to the Free Software 00017 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00018 00019 Sam Lantinga 00020 slouken@libsdl.org 00021 */ 00022 00029 #ifndef _SDL_quit_h 00030 #define _SDL_quit_h 00031 00032 #include "SDL_stdinc.h" 00033 #include "SDL_error.h" 00034 00035 /* 00036 An SDL_QUITEVENT is generated when the user tries to close the application 00037 window. If it is ignored or filtered out, the window will remain open. 00038 If it is not ignored or filtered, it is queued normally and the window 00039 is allowed to close. When the window is closed, screen updates will 00040 complete, but have no effect. 00041 00042 SDL_Init() installs signal handlers for SIGINT (keyboard interrupt) 00043 and SIGTERM (system termination request), if handlers do not already 00044 exist, that generate SDL_QUITEVENT events as well. There is no way 00045 to determine the cause of an SDL_QUITEVENT, but setting a signal 00046 handler in your application will override the default generation of 00047 quit events for that signal. 00048 */ 00049 00050 /* There are no functions directly affecting the quit event */ 00051 #define SDL_QuitRequested() \ 00052 (SDL_PumpEvents(), SDL_PeepEvents(NULL,0,SDL_PEEKEVENT,SDL_QUITMASK)) 00053 00054 #endif /* _SDL_quit_h */