include/SDL_events.h
changeset 7190 11612d544fcd
parent 7188 20bd120bf7e4
child 7191 75360622e65f
     1.1 --- a/include/SDL_events.h	Sat May 18 09:35:09 2013 -0700
     1.2 +++ b/include/SDL_events.h	Sat May 18 12:48:50 2013 -0700
     1.3 @@ -61,6 +61,32 @@
     1.4      /* Application events */
     1.5      SDL_QUIT           = 0x100, /**< User-requested quit */
     1.6  
     1.7 +    /* These application events have special meaning on iOS, see README.iOS for details */
     1.8 +	SDL_APP_TERMINATING,        /**< The application is being terminated by the OS
     1.9 +                                     Called on iOS in applicationWillTerminate()
    1.10 +                                     Called on Android in onDestroy()
    1.11 +                                */
    1.12 +	SDL_APP_LOWMEMORY,          /**< The application is low on memory, free memory if possible.
    1.13 +                                     Called on iOS in applicationDidReceiveMemoryWarning()
    1.14 +                                     Called on Android in onLowMemory()
    1.15 +                                */
    1.16 +	SDL_APP_WILLENTERBACKGROUND, /**< The application is about to enter the background
    1.17 +                                     Called on iOS in applicationWillResignActive()
    1.18 +                                     Called on Android in onPause()
    1.19 +                                */
    1.20 +	SDL_APP_DIDENTERBACKGROUND, /**< The application did enter the background and may not get CPU for some time
    1.21 +                                     Called on iOS in applicationDidEnterBackground()
    1.22 +                                     Called on Android in onPause()
    1.23 +                                */
    1.24 +	SDL_APP_WILLENTERFOREGROUND, /**< The application is about to enter the foreground
    1.25 +                                     Called on iOS in applicationWillEnterForeground()
    1.26 +                                     Called on Android in onResume()
    1.27 +                                */
    1.28 +	SDL_APP_DIDENTERFOREGROUND, /**< The application is now interactive
    1.29 +                                     Called on iOS in applicationDidBecomeActive()
    1.30 +                                     Called on Android in onResume()
    1.31 +                                */
    1.32 +
    1.33      /* Window events */
    1.34      SDL_WINDOWEVENT    = 0x200, /**< Window state change */
    1.35      SDL_SYSWMEVENT,             /**< System specific event */
    1.36 @@ -109,7 +135,7 @@
    1.37  
    1.38      /* Drag and drop events */
    1.39      SDL_DROPFILE        = 0x1000, /**< The system requests a file open */
    1.40 -
    1.41 +	
    1.42      /** Events ::SDL_USEREVENT through ::SDL_LASTEVENT are for your use,
    1.43       *  and should be allocated with SDL_RegisterEvents()
    1.44       */
    1.45 @@ -427,6 +453,14 @@
    1.46      Uint32 timestamp;
    1.47  } SDL_QuitEvent;
    1.48  
    1.49 +/**
    1.50 + *  \brief OS Specific event
    1.51 + */
    1.52 +typedef struct SDL_OSEvent
    1.53 +{
    1.54 +    Uint32 type;        /**< ::SDL_QUIT */
    1.55 +    Uint32 timestamp;
    1.56 +} SDL_OSEvent;
    1.57  
    1.58  /**
    1.59   *  \brief A user-defined event type (event.user.*)