All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class org.ifarchive.glk.Event

java.lang.Object
   |
   +----org.ifarchive.glk.Event

public class Event
extends Object
The Event is passed to Glk.select(). It will be populated when select() returns.

Most of the time, you only get the events that you request. However, there are some events which can arrive at any time. This is why you must always call Glk.select() in a loop, and continue the loop until you get the event you really want.

See Also:
select, selectPoll

Variable Index

 o evtype_Arrange
An event signalling that the sizes of some windows have changed.
 o evtype_CharInput
A keystroke event in a window.
 o evtype_Hyperlink
The selection of a hyperlink in a window.
 o evtype_LineInput
A full line of input completed in a window.
 o evtype_MouseInput
A mouse click in a window.
 o evtype_None
No event.
 o evtype_Redraw
An event signalling that graphics windows must be redrawn.
 o evtype_SoundNotify
A sound has completed playing.
 o evtype_Timer
An event that repeats at fixed intervals.
 o type
The type of the event.
 o val1
The meaning of this field depends on the type of the Event.
 o val2
The meaning of this field depends on the type of the Event.
 o win
The window that spawned the event, if relevant.

Constructor Index

 o Event()

Variables

 o evtype_None
 public static final int evtype_None
No event. This is a placeholder, and Glk.select() never returns it.

 o evtype_Timer
 public static final int evtype_Timer
An event that repeats at fixed intervals.

 o evtype_CharInput
 public static final int evtype_CharInput
A keystroke event in a window.

 o evtype_LineInput
 public static final int evtype_LineInput
A full line of input completed in a window.

 o evtype_MouseInput
 public static final int evtype_MouseInput
A mouse click in a window.

 o evtype_Arrange
 public static final int evtype_Arrange
An event signalling that the sizes of some windows have changed.

 o evtype_Redraw
 public static final int evtype_Redraw
An event signalling that graphics windows must be redrawn.

 o evtype_SoundNotify
 public static final int evtype_SoundNotify
A sound has completed playing. val1 is the sound's resource ID and val2 is the value you passed to SoundChannel.play() as "notify".

See Also:
play
 o evtype_Hyperlink
 public static final int evtype_Hyperlink
The selection of a hyperlink in a window.

 o type
 public int type
The type of the event. This can be one of evtype_*, or a negative number for implementation-defined events.

 o win
 public Window win
The window that spawned the event, if relevant.

 o val1
 public long val1
The meaning of this field depends on the type of the Event.

 o val2
 public long val2
The meaning of this field depends on the type of the Event.

Constructors

 o Event
 public Event()

All Packages  Class Hierarchy  This Package  Previous  Next  Index