crystalspace.jbind.impl.csutil.evoutlet
Class csEventOutlet

java.lang.Object
  extended bycrystalspace.jbind.impl.csNativeObject
      extended bycrystalspace.jbind.impl.csutil.scf.csBase
          extended bycrystalspace.jbind.impl.csutil.evoutlet.csEventOutlet
All Implemented Interfaces:
iBase, iEventOutlet, iPointer

public class csEventOutlet
extends csBase
implements iEventOutlet

Author:
qan To change the template for this generated type comment go to Window>Preferences>Java>Code Generation>Code and Comments

Field Summary
 
Fields inherited from class crystalspace.jbind.impl.csNativeObject
ImplFactory, nPointer
 
Constructor Summary
csEventOutlet(iPointer nPointer)
           
 
Method Summary
 void broadcast(int iCode)
          Put a broadcast event into event queue.
 void broadcast(int iCode, iPointer iInfo)
          Put a broadcast event into event queue.
 iEvent createEvent()
          Create a event object on behalf of the event queue.
static java.lang.Class getInterfaceClass()
           
static java.lang.String getInterfaceName()
           
static int getInterfaceVersion()
           
 java.lang.String getName()
          Return the name of the interface
 int getVersion()
          Return the version of the interface
 void immediateBroadcast(int iCode, iPointer iInfo)
          This is a special routine which is called for example when the application is going to be suspended (suspended means "frozen", that is, application is forced to not run for some time).
static void initSCF()
           
protected  boolean isNativePointerValidSafe()
           
 void joystick(int iNumber, int iButton, boolean iDown, int x, int y)
          Put a joystick event into event queue. iNumber is joystick number (from 0 to CS_MAX_JOYSTICK_COUNT-1).
 void key(int codeRaw, int codeCooked, boolean iDown)
          Put a keyboard event into event queue.
 void mouse(int iButton, boolean iDown, int x, int y)
          Put a mouse event into event queue.
 void post(iEvent event)
          Put a previously created event into system event queue.
 
Methods inherited from class crystalspace.jbind.impl.csutil.scf.csBase
decRef, equals, finalize, getRefCount, incRef, nDelete, queryInterface, queryInterfaceSafe
 
Methods inherited from class crystalspace.jbind.impl.csNativeObject
changePointer, getPointer, getPointer, getPointerArray, hashCode, isMemoryOwner, isNativePointerValid, isNativePointerValidSafe, newNativeObject, setMemoryOwner, toString
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface crystalspace.jbind.interfaces.iutil.scf.iBase
decRef, getRefCount, incRef, queryInterface, queryInterfaceSafe
 
Methods inherited from interface crystalspace.jbind.interfaces.iPointer
changePointer, getPointer, isMemoryOwner, setMemoryOwner
 

Constructor Detail

csEventOutlet

public csEventOutlet(iPointer nPointer)
Parameters:
nPointer -
Method Detail

getVersion

public int getVersion()
Description copied from interface: iBase
Return the version of the interface

Specified by:
getVersion in interface iBase
Specified by:
getVersion in class csBase

getName

public java.lang.String getName()
Description copied from interface: iBase
Return the name of the interface

Specified by:
getName in interface iBase
Specified by:
getName in class csBase

initSCF

public static void initSCF()

broadcast

public void broadcast(int iCode)
Description copied from interface: iEventOutlet
Put a broadcast event into event queue. This is a generalized way to put any broadcast event into the system event queue. Command code may be used to tell user application that application's focused state has changed (cscmdFocusChanged), that a graphics context has been resized (cscmdContextResize), that it has been closed (cscmdContextClose), to finish the application immediately (cscmdQuit) and so on. Implemented in csEventOutlet.

Specified by:
broadcast in interface iEventOutlet
Parameters:
iCode -

broadcast

public void broadcast(int iCode,
                      iPointer iInfo)
Description copied from interface: iEventOutlet
Put a broadcast event into event queue. This is a generalized way to put any broadcast event into the system event queue. Command code may be used to tell user application that application's focused state has changed (cscmdFocusChanged), that a graphics context has been resized (cscmdContextResize), that it has been closed (cscmdContextClose), to finish the application immediately (cscmdQuit) and so on. Implemented in csEventOutlet.

Specified by:
broadcast in interface iEventOutlet
Parameters:
iCode -
iInfo -

getInterfaceVersion

public static int getInterfaceVersion()

getInterfaceName

public static java.lang.String getInterfaceName()

getInterfaceClass

public static java.lang.Class getInterfaceClass()

isNativePointerValidSafe

protected boolean isNativePointerValidSafe()

createEvent

public iEvent createEvent()
Description copied from interface: iEventOutlet
Create a event object on behalf of the event queue. A general function for generating publicly any type of event. Since all events for a particular event queue should be created from the same heap, you should generate first a event object (through CreateEvent method) then you fill it whatever you like and finally you insert it into the event queue with the Post() method. Implemented in csEventOutlet. Referenced by csApp::CreateEvent().

Specified by:
createEvent in interface iEventOutlet
Returns:
See Also:
iEventOutlet.createEvent()

immediateBroadcast

public void immediateBroadcast(int iCode,
                               iPointer iInfo)
Description copied from interface: iEventOutlet
This is a special routine which is called for example when the application is going to be suspended (suspended means "frozen", that is, application is forced to not run for some time). This happens for example when user switches away from a full-screen application on any OS with MGL canvas driver, or when it presses with the OS/2 DIVE driver, or in any other drivers that supports forced pausing of applications. This generates a `normal' broadcast event with given command code; the crucial difference is that the event is being delivered to all clients immediately. The reason is that the application is frozen right after returning from this routine thus it will get the next chance to process any events only after it will be resumed (which is kind of too late to process this kind of events). Implemented in csEventOutlet.

Specified by:
immediateBroadcast in interface iEventOutlet
Parameters:
iCode -
iInfo -
See Also:
iEventOutlet.immediateBroadcast(int, crystalspace.jbind.interfaces.iPointer)

joystick

public void joystick(int iNumber,
                     int iButton,
                     boolean iDown,
                     int x,
                     int y)
Description copied from interface: iEventOutlet
Put a joystick event into event queue. iNumber is joystick number (from 0 to CS_MAX_JOYSTICK_COUNT-1). If iButton == 0, this is a joystick move event and iDown is ignored. Otherwise an joystick up/down event is generated. iButton can be from 1 to CS_MAX_JOYSTICK_BUTTONS (or 0 for a joystick move event). Implemented in csEventOutlet.

Specified by:
joystick in interface iEventOutlet
Parameters:
iNumber -
iButton -
iDown -
x -
y -
See Also:
iEventOutlet.joystick(int, int, boolean, int, int)

key

public void key(int codeRaw,
                int codeCooked,
                boolean iDown)
Description copied from interface: iEventOutlet
Put a keyboard event into event queue. Note that iKey is the key code, either the alphanumeric symbol that is emmited by the given key when no shift keys/modes are active (e.g. 'a', 'b', '.', '/' and so on) or one of CSKEY_XXX values (with value above 255) and the iChar parameter is the translated key, after applying all modeshift keys. Never assume that any of these two codes is always less 127, not being 255 or 224 -- these are common mistakes for English-speaking programmers. if you pass -1 as character code, the iChar argument is computed using an simple internal translation table that takes care of Control/Shift/Alt for English characters. But in general it is hardly advised your driver to make the conversion using OS-specific National Language Support subsystem so that national characters are properly supported. Implemented in csEventOutlet.

Specified by:
key in interface iEventOutlet
Parameters:
codeRaw -
codeCooked -
iDown -
See Also:
iEventOutlet.key(int, int, boolean)

mouse

public void mouse(int iButton,
                  boolean iDown,
                  int x,
                  int y)
Description copied from interface: iEventOutlet
Put a mouse event into event queue. If iButton == 0, this is a mouse motion event, and iDown argument is ignored. Otherwise an mousedown or mouseup event is generated at respective location. iButton can be in the range from 1 to CS_MAX_MOUSE_BUTTONS (or 0 for mouse move event). Implemented in csEventOutlet.

Specified by:
mouse in interface iEventOutlet
Parameters:
iButton -
iDown -
x -
y -
See Also:
iEventOutlet.mouse(int, boolean, int, int)

post

public void post(iEvent event)
Description copied from interface: iEventOutlet
Put a previously created event into system event queue. NOTE: YOU SHOULD PASS HERE ONLY OBJECTS THAT WERE CREATED VIA CreateEvent() FUNCTION! IF YOU PASS ARBITRARY EVENTS CREATED BY YOUR PROGRAM/PLUGIN IN SOME ENVIRONMENTS IT WILL CRASH! Implemented in csEventOutlet. Referenced by csApp::Post().

Specified by:
post in interface iEventOutlet
Parameters:
event -
See Also:
iEventOutlet.post(crystalspace.jbind.interfaces.iutil.event.iEvent)