SDL_ActiveEvent3
Application visibility event structure
Structure definition
typedef struct{Uint8 type;Uint8 gain;Uint8 state;} SDL_ActiveEvent;
Structure data
type-
SDL_ACTIVEEVENT.
gain-
0 if the event is a loss or 1 if it is a gain.
state-
SDL_APPMOUSEFOCUSif mouse focus was gained or lost,SDL_APPINPUTFOCUSif input focus was gained or lost, orSDL_APPACTIVEif the application was iconified (gain=0) or restored(gain=1).
Overview
SDL_ActiveEvent is a member of the SDL_Event union and is used when an event of type SDL_ACTIVEEVENT is reported.
When the mouse leaves or enters the window area a SDL_APPMOUSEFOCUS type activation event occurs, if the mouse entered the window then gain will be 1, otherwise gain will be 0. A SDL_APPINPUTFOCUS type activation event occurs when the application loses or gains keyboard focus. This usually occurs when another application is made active. Finally, a SDL_APPACTIVE type event occurs when the application is either minimised/iconified (gain=0) or restored.
Note:
This event does not occur when an application window is first created.
Releases
11 releases since Debian 3.0 (Woody); the text changed 1 time.