SDL Library

Dependents:   H261_decoder

Committer:
miruga27
Date:
Thu Sep 22 00:03:09 2016 +0000
Revision:
0:7fb6877b5d7c
SDL

Who changed what in which revision?

UserRevisionLine numberNew contents of line
miruga27 0:7fb6877b5d7c 1 /*
miruga27 0:7fb6877b5d7c 2 Simple DirectMedia Layer
miruga27 0:7fb6877b5d7c 3 Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
miruga27 0:7fb6877b5d7c 4
miruga27 0:7fb6877b5d7c 5 This software is provided 'as-is', without any express or implied
miruga27 0:7fb6877b5d7c 6 warranty. In no event will the authors be held liable for any damages
miruga27 0:7fb6877b5d7c 7 arising from the use of this software.
miruga27 0:7fb6877b5d7c 8
miruga27 0:7fb6877b5d7c 9 Permission is granted to anyone to use this software for any purpose,
miruga27 0:7fb6877b5d7c 10 including commercial applications, and to alter it and redistribute it
miruga27 0:7fb6877b5d7c 11 freely, subject to the following restrictions:
miruga27 0:7fb6877b5d7c 12
miruga27 0:7fb6877b5d7c 13 1. The origin of this software must not be misrepresented; you must not
miruga27 0:7fb6877b5d7c 14 claim that you wrote the original software. If you use this software
miruga27 0:7fb6877b5d7c 15 in a product, an acknowledgment in the product documentation would be
miruga27 0:7fb6877b5d7c 16 appreciated but is not required.
miruga27 0:7fb6877b5d7c 17 2. Altered source versions must be plainly marked as such, and must not be
miruga27 0:7fb6877b5d7c 18 misrepresented as being the original software.
miruga27 0:7fb6877b5d7c 19 3. This notice may not be removed or altered from any source distribution.
miruga27 0:7fb6877b5d7c 20 */
miruga27 0:7fb6877b5d7c 21
miruga27 0:7fb6877b5d7c 22 /**
miruga27 0:7fb6877b5d7c 23 * \file SDL_quit.h
miruga27 0:7fb6877b5d7c 24 *
miruga27 0:7fb6877b5d7c 25 * Include file for SDL quit event handling.
miruga27 0:7fb6877b5d7c 26 */
miruga27 0:7fb6877b5d7c 27
miruga27 0:7fb6877b5d7c 28 #ifndef _SDL_quit_h
miruga27 0:7fb6877b5d7c 29 #define _SDL_quit_h
miruga27 0:7fb6877b5d7c 30
miruga27 0:7fb6877b5d7c 31 #include "SDL_stdinc.h"
miruga27 0:7fb6877b5d7c 32 #include "SDL_error.h"
miruga27 0:7fb6877b5d7c 33
miruga27 0:7fb6877b5d7c 34 /**
miruga27 0:7fb6877b5d7c 35 * \file SDL_quit.h
miruga27 0:7fb6877b5d7c 36 *
miruga27 0:7fb6877b5d7c 37 * An ::SDL_QUIT event is generated when the user tries to close the application
miruga27 0:7fb6877b5d7c 38 * window. If it is ignored or filtered out, the window will remain open.
miruga27 0:7fb6877b5d7c 39 * If it is not ignored or filtered, it is queued normally and the window
miruga27 0:7fb6877b5d7c 40 * is allowed to close. When the window is closed, screen updates will
miruga27 0:7fb6877b5d7c 41 * complete, but have no effect.
miruga27 0:7fb6877b5d7c 42 *
miruga27 0:7fb6877b5d7c 43 * SDL_Init() installs signal handlers for SIGINT (keyboard interrupt)
miruga27 0:7fb6877b5d7c 44 * and SIGTERM (system termination request), if handlers do not already
miruga27 0:7fb6877b5d7c 45 * exist, that generate ::SDL_QUIT events as well. There is no way
miruga27 0:7fb6877b5d7c 46 * to determine the cause of an ::SDL_QUIT event, but setting a signal
miruga27 0:7fb6877b5d7c 47 * handler in your application will override the default generation of
miruga27 0:7fb6877b5d7c 48 * quit events for that signal.
miruga27 0:7fb6877b5d7c 49 *
miruga27 0:7fb6877b5d7c 50 * \sa SDL_Quit()
miruga27 0:7fb6877b5d7c 51 */
miruga27 0:7fb6877b5d7c 52
miruga27 0:7fb6877b5d7c 53 /* There are no functions directly affecting the quit event */
miruga27 0:7fb6877b5d7c 54
miruga27 0:7fb6877b5d7c 55 #define SDL_QuitRequested() \
miruga27 0:7fb6877b5d7c 56 (SDL_PumpEvents(), (SDL_PeepEvents(NULL,0,SDL_PEEKEVENT,SDL_QUIT,SDL_QUIT) > 0))
miruga27 0:7fb6877b5d7c 57
miruga27 0:7fb6877b5d7c 58 #endif /* _SDL_quit_h */