sdljava.event
Class SDLActiveEvent

java.lang.Object
  extended by sdljava.event.SDLEvent
      extended by sdljava.event.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
static int SDL_APPACTIVE
          The application is active
static int SDL_APPINPUTFOCUS
          The app has input focus
static int SDL_APPMOUSEFOCUS
          The app has mouse coverage
(package private)  SDL_ActiveEvent swigActiveEvent
          Reference to the SWIG generated event
 
Fields inherited from class sdljava.event.SDLEvent
activeEvent, dummyEvent, exposeEvent, joyAxisEvent, joyBallEvent, joyButtonEvent, joyHatEvent, mouseButtonEvent, mouseMotionEvent, quitEvent, resizeEvent, SDL_ACTIVEEVENT, SDL_ACTIVEEVENTMASK, SDL_ADDEVENT, SDL_BUTTON_LEFT, SDL_BUTTON_MIDDLE, SDL_BUTTON_RIGHT, SDL_BUTTON_WHEELDOWN, SDL_BUTTON_WHEELUP, SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL, SDL_DISABLE, SDL_ENABLE, SDL_GETEVENT, SDL_IGNORE, SDL_JOYAXISMOTION, SDL_JOYAXISMOTIONMASK, SDL_JOYBALLMOTION, SDL_JOYBALLMOTIONMASK, SDL_JOYBUTTONDOWN, SDL_JOYBUTTONDOWNMASK, SDL_JOYBUTTONUP, SDL_JOYBUTTONUPMASK, SDL_JOYEVENTMASK, SDL_JOYHATMOTION, SDL_JOYHATMOTIONMASK, SDL_KEYDOWN, SDL_KEYDOWNMASK, SDL_KEYUP, SDL_KEYUPMASK, SDL_MOUSEBUTTONDOWN, SDL_MOUSEBUTTONDOWNMASK, SDL_MOUSEBUTTONUP, SDL_MOUSEBUTTONUPMASK, SDL_MOUSEEVENTMASK, SDL_MOUSEMOTION, SDL_MOUSEMOTIONMASK, SDL_NOEVENT, SDL_PEEKEVENT, SDL_PRESSED, SDL_QUERY, SDL_QUIT, SDL_QUITMASK, SDL_RELEASED, SDL_SYSWMEVENT, SDL_SYSWMEVENTMASK, SDL_USEREVENT, SDL_VIDEOEXPOSE, SDL_VIDEOEXPOSEMASK, SDL_VIDEORESIZE, SDL_VIDEORESIZEMASK, sdlKeyboardEvent, swigEvent, sysWMEvent, userEvent
 
Constructor Summary
SDLActiveEvent()
           
 
Method Summary
 SDL_ActiveEvent getSwigActiveEvent()
          Gets the value of swigActiveEvent
 int getType()
          The type of the this event
 void setSwigActiveEvent(SDL_ActiveEvent argSwigActiveEvent)
          Sets the value of swigActiveEvent
 java.lang.String toString()
           
(package private)  java.lang.String translateState(int state)
           
 
Methods inherited from class sdljava.event.SDLEvent
enableKeyRepeat, enableUNICODE, eventState, getAppState, getKeyName, getModState, getMouseState, getRelativeMouseState, joystickEventState, pollEvent, pollEvent, processEvent, pumpEvents, setModState, waitEvent, waitEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

swigActiveEvent

SDL_ActiveEvent swigActiveEvent
Reference to the SWIG generated event


SDL_APPMOUSEFOCUS

public static final int SDL_APPMOUSEFOCUS
The app has mouse coverage

See Also:
Constant Field Values

SDL_APPINPUTFOCUS

public static final int SDL_APPINPUTFOCUS
The app has input focus

See Also:
Constant Field Values

SDL_APPACTIVE

public static final int SDL_APPACTIVE
The application is active

See Also:
Constant Field Values
Constructor Detail

SDLActiveEvent

public SDLActiveEvent()
Method Detail

getSwigActiveEvent

public SDL_ActiveEvent getSwigActiveEvent()
Gets the value of swigActiveEvent

Returns:
the value of swigActiveEvent

setSwigActiveEvent

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

Parameters:
argSwigActiveEvent - Value to assign to this.swigActiveEvent

getType

public int getType()
The type of the this event

Specified by:
getType in class SDLEvent
Returns:
The type of event

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
a String representation of myself

translateState

java.lang.String translateState(int state)