crystalspace.jbind.impl.csutil.csinput
Class csKeyboardDriver

java.lang.Object
  extended bycrystalspace.jbind.impl.csNativeObject
      extended bycrystalspace.jbind.impl.csutil.scf.csBase
          extended bycrystalspace.jbind.impl.csutil.csinput.csKeyboardDriver
All Implemented Interfaces:
iBase, iKeyboardDriver, iPointer

public class csKeyboardDriver
extends csBase
implements iKeyboardDriver

Author:
Quentin Anciaux

Field Summary
 
Fields inherited from class crystalspace.jbind.impl.csNativeObject
ImplFactory, nPointer
 
Constructor Summary
csKeyboardDriver(iPointer nPointer)
           
 
Method Summary
 iKeyComposer createKeyComposer()
          Return an instance of the keyboard composer.
 void doKey(int codeRaw, int codeCooked, boolean iDown)
          Call this routine to add a key down/up event to queue.
 void doKey(int codeRaw, int codeCooked, boolean iDown, boolean autoRepeat)
          Call this routine to add a key down/up event to queue.
 void doKey(int codeRaw, int codeCooked, boolean iDown, boolean autoRepeat, int charType)
          Call this routine to add a key down/up event to queue.
static java.lang.Class getInterfaceClass()
           
static java.lang.String getInterfaceName()
           
static int getInterfaceVersion()
           
 boolean getKeyState(int codeRaw)
          Query the state of a key.
 int getModifierState(int codeRaw)
          Get the current state of the modifiers.
 java.lang.String getName()
          Return the name of the interface
 int getVersion()
          Return the version of the interface
static void initSCF()
           
protected  boolean isNativePointerValidSafe(long pointer)
           
 void reset()
          Call to release all key down flags (when focus switches from application window, for example);.
 
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, 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

csKeyboardDriver

public csKeyboardDriver(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()

getInterfaceVersion

public static int getInterfaceVersion()

getInterfaceName

public static java.lang.String getInterfaceName()

getInterfaceClass

public static java.lang.Class getInterfaceClass()

isNativePointerValidSafe

protected boolean isNativePointerValidSafe(long pointer)
Specified by:
isNativePointerValidSafe in class csNativeObject

createKeyComposer

public iKeyComposer createKeyComposer()
Description copied from interface: iKeyboardDriver
Return an instance of the keyboard composer. Remarks: All composers are independent. Specifically, passing a dead key to one composer won't affect the result after the next keyboard event of any other composer. Implemented in csKeyboardDriver.

Specified by:
createKeyComposer in interface iKeyboardDriver
Returns:
See Also:
iKeyboardDriver.createKeyComposer()

doKey

public void doKey(int codeRaw,
                  int codeCooked,
                  boolean iDown,
                  boolean autoRepeat,
                  int charType)
Description copied from interface: iKeyboardDriver
Call this routine to add a key down/up event to queue. Parameters: codeRaw 'Raw' code of the pressed key. codeCooked 'Cooked' code of the pressed key. iDown Whether the key is up or down. autoRepeat Auto-repeat flag for the key event. Typically only used by the platform-specific keyboard agents. charType When the cooked code is a character, it determines whether it is a normal, or dead character. Implemented in csKeyboardDriver.

Specified by:
doKey in interface iKeyboardDriver
Parameters:
codeRaw -
codeCooked -
iDown -
autoRepeat -
charType -
See Also:
iKeyboardDriver.doKey(int, int, boolean, boolean, int)

doKey

public void doKey(int codeRaw,
                  int codeCooked,
                  boolean iDown,
                  boolean autoRepeat)
Description copied from interface: iKeyboardDriver
Call this routine to add a key down/up event to queue. Parameters: codeRaw 'Raw' code of the pressed key. codeCooked 'Cooked' code of the pressed key. iDown Whether the key is up or down. autoRepeat Auto-repeat flag for the key event. Typically only used by the platform-specific keyboard agents. charType When the cooked code is a character, it determines whether it is a normal, or dead character. Implemented in csKeyboardDriver.

Specified by:
doKey in interface iKeyboardDriver
Parameters:
codeRaw -
codeCooked -
iDown -
autoRepeat -
See Also:
iKeyboardDriver.doKey(int, int, boolean, boolean)

doKey

public void doKey(int codeRaw,
                  int codeCooked,
                  boolean iDown)
Description copied from interface: iKeyboardDriver
Call this routine to add a key down/up event to queue. Parameters: codeRaw 'Raw' code of the pressed key. codeCooked 'Cooked' code of the pressed key. iDown Whether the key is up or down. autoRepeat Auto-repeat flag for the key event. Typically only used by the platform-specific keyboard agents. charType When the cooked code is a character, it determines whether it is a normal, or dead character. Implemented in csKeyboardDriver.

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

getKeyState

public boolean getKeyState(int codeRaw)
Description copied from interface: iKeyboardDriver
Query the state of a key. All key codes are supported. Returns true if the key is pressed, false if not. Implemented in csKeyboardDriver.

Specified by:
getKeyState in interface iKeyboardDriver
Parameters:
codeRaw -
Returns:
See Also:
iKeyboardDriver.getKeyState(int)

getModifierState

public int getModifierState(int codeRaw)
Description copied from interface: iKeyboardDriver
Get the current state of the modifiers. Implemented in csKeyboardDriver.

Specified by:
getModifierState in interface iKeyboardDriver
Parameters:
codeRaw -
Returns:
See Also:
iKeyboardDriver.getModifierState(int)

reset

public void reset()
Description copied from interface: iKeyboardDriver
Call to release all key down flags (when focus switches from application window, for example);. Implemented in csKeyboardDriver.

Specified by:
reset in interface iKeyboardDriver
See Also:
iKeyboardDriver.reset()