sdljava.event

Class SDLActiveEvent

public class SDLActiveEvent extends SDLEvent

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.

Version: $Id: SDLActiveEvent.java,v 1.8 2005/01/25 02:50:43 ivan_ganza Exp $

Author: Ivan Z. Ganza

Field Summary
SDL_ActiveEventswigActiveEvent
Reference to the SWIG generated event
static intSDL_APPACTIVE
The application is active
static intSDL_APPINPUTFOCUS
The app has input focus
static intSDL_APPMOUSEFOCUS
The app has mouse coverage
Method Summary
SDL_ActiveEventgetSwigActiveEvent()
Gets the value of swigActiveEvent
intgetType()
The type of the this event
voidsetSwigActiveEvent(SDL_ActiveEvent argSwigActiveEvent)
Sets the value of swigActiveEvent
StringtoString()
StringtranslateState(int state)

Field Detail

swigActiveEvent

SDL_ActiveEvent swigActiveEvent
Reference to the SWIG generated event

SDL_APPACTIVE

public static final int SDL_APPACTIVE
The application is active

SDL_APPINPUTFOCUS

public static final int SDL_APPINPUTFOCUS
The app has input focus

SDL_APPMOUSEFOCUS

public static final int SDL_APPMOUSEFOCUS
The app has mouse coverage

Method Detail

getSwigActiveEvent

public SDL_ActiveEvent getSwigActiveEvent()
Gets the value of swigActiveEvent

Returns: the value of swigActiveEvent

getType

public int getType()
The type of the this event

Returns: The type of event

setSwigActiveEvent

public void setSwigActiveEvent(SDL_ActiveEvent argSwigActiveEvent)
Sets the value of swigActiveEvent

Parameters: argSwigActiveEvent Value to assign to this.swigActiveEvent

toString

public String toString()

Returns: a String representation of myself

translateState

String translateState(int state)