include/SDL_quit.h
author Sam Lantinga <slouken@libsdl.org>
Mon, 19 Oct 2009 13:31:58 +0000
changeset 3407 d3baf5ac4e37
parent 2859 99210400e8b9
child 3697 f7b03b6838cb
permissions -rw-r--r--
Partial fix for bug #859

Header file update from Ken for improved doxygen output
slouken@0
     1
/*
slouken@0
     2
    SDL - Simple DirectMedia Layer
slouken@2859
     3
    Copyright (C) 1997-2009 Sam Lantinga
slouken@0
     4
slouken@0
     5
    This library is free software; you can redistribute it and/or
slouken@1312
     6
    modify it under the terms of the GNU Lesser General Public
slouken@0
     7
    License as published by the Free Software Foundation; either
slouken@1312
     8
    version 2.1 of the License, or (at your option) any later version.
slouken@0
     9
slouken@0
    10
    This library is distributed in the hope that it will be useful,
slouken@0
    11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
slouken@0
    12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
slouken@1312
    13
    Lesser General Public License for more details.
slouken@0
    14
slouken@1312
    15
    You should have received a copy of the GNU Lesser General Public
slouken@1312
    16
    License along with this library; if not, write to the Free Software
slouken@1312
    17
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
slouken@0
    18
slouken@0
    19
    Sam Lantinga
slouken@251
    20
    slouken@libsdl.org
slouken@0
    21
*/
slouken@0
    22
slouken@1895
    23
/**
slouken@3407
    24
 *  \file SDL_quit.h
slouken@3407
    25
 *  
slouken@3407
    26
 *  Include file for SDL quit event handling.
slouken@1895
    27
 */
slouken@0
    28
slouken@0
    29
#ifndef _SDL_quit_h
slouken@0
    30
#define _SDL_quit_h
slouken@0
    31
slouken@1356
    32
#include "SDL_stdinc.h"
slouken@1358
    33
#include "SDL_error.h"
slouken@1356
    34
slouken@3407
    35
/**
slouken@3407
    36
 *  \file SDL_quit.h
slouken@3407
    37
 *  
slouken@3407
    38
 *  An ::SDL_QUIT event is generated when the user tries to close the application
slouken@3407
    39
 *  window.  If it is ignored or filtered out, the window will remain open.
slouken@3407
    40
 *  If it is not ignored or filtered, it is queued normally and the window
slouken@3407
    41
 *  is allowed to close.  When the window is closed, screen updates will 
slouken@3407
    42
 *  complete, but have no effect.
slouken@3407
    43
 *
slouken@3407
    44
 *  SDL_Init() installs signal handlers for SIGINT (keyboard interrupt)
slouken@3407
    45
 *  and SIGTERM (system termination request), if handlers do not already
slouken@3407
    46
 *  exist, that generate ::SDL_QUIT events as well.  There is no way
slouken@3407
    47
 *  to determine the cause of an ::SDL_QUIT event, but setting a signal
slouken@3407
    48
 *  handler in your application will override the default generation of
slouken@3407
    49
 *  quit events for that signal.
slouken@3407
    50
 *  
slouken@3407
    51
 *  \sa SDL_Quit()
slouken@3407
    52
 */
slouken@0
    53
slouken@0
    54
/* There are no functions directly affecting the quit event */
slouken@3407
    55
slouken@0
    56
#define SDL_QuitRequested() \
slouken@0
    57
        (SDL_PumpEvents(), SDL_PeepEvents(NULL,0,SDL_PEEKEVENT,SDL_QUITMASK))
slouken@0
    58
slouken@0
    59
#endif /* _SDL_quit_h */