crystalspace.jbind.impl.csutil.event
Class csEventPlug

java.lang.Object
  extended bycrystalspace.jbind.impl.csNativeObject
      extended bycrystalspace.jbind.impl.csutil.scf.csBase
          extended bycrystalspace.jbind.impl.csutil.event.csEventPlug
All Implemented Interfaces:
iBase, iEventPlug, iJPointer, iPointer

public class csEventPlug
extends csBase
implements iEventPlug

Author:
Quentin Anciaux

Field Summary
 
Fields inherited from class crystalspace.jbind.impl.csNativeObject
ImplFactory, nPointer
 
Constructor Summary
csEventPlug(iPointer nPointer)
           
 
Method Summary
 void enableEvents(int i, boolean b)
          Enable or disable certain event class(es);.
 java.lang.String getName()
          Return the name of the interface
 int getPotentiallyConflictingEvents()
          Get the mask of events that can be generated by this source and are generated directly from user actions (e.g. key presses, mouse clicks and so on);.
 int getVersion()
          Return the version of the interface
protected  boolean isNativePointerValidSafe(long pointer)
           
 int queryEventPriority(int iType)
          Query how strong the plug's wish to generate certain class of events is.
 
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.iPointer
changePointer, getPointer, isMemoryOwner, setMemoryOwner
 

Constructor Detail

csEventPlug

public csEventPlug(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
See Also:
iBase.getVersion()

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
See Also:
iBase.getName()

isNativePointerValidSafe

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

enableEvents

public void enableEvents(int i,
                         boolean b)
Description copied from interface: iEventPlug
Enable or disable certain event class(es);. This is not a mandatory function; in fact most event plugs may safely ignore it. The mean of this function is purely advisory; for example if both keyup and keydown events are disabled the plug may want to release the keyboard and so on. Definition at line 344 of file event.h.

Specified by:
enableEvents in interface iEventPlug
Parameters:
i -
b -
See Also:
iEventPlug.enableEvents(int, boolean)

getPotentiallyConflictingEvents

public int getPotentiallyConflictingEvents()
Description copied from interface: iEventPlug
Get the mask of events that can be generated by this source and are generated directly from user actions (e.g. key presses, mouse clicks and so on);. This is used to locate potentialy conflicting combinations of event source plugins (for example two event sources may generate a csevKeyDown event each from every key press);. The mask is a combination of CSEVTYPE_XXX values ORed together. Implemented in csGraphics2DAA, csGraphics2DGLCommon, csGraphics2DSDL, csGraphics2DXLib, and csGraphics2DSVGALib.

Specified by:
getPotentiallyConflictingEvents in interface iEventPlug
Returns:
See Also:
iEventPlug.getPotentiallyConflictingEvents()

queryEventPriority

public int queryEventPriority(int iType)
Description copied from interface: iEventPlug
Query how strong the plug's wish to generate certain class of events is. The plug with the strongest wish wins. The argument is one of CSEVTYPE_XXX values (but never a combination of several OR'ed together);. The typical value is somewhere around 100; the event plugs which are sometimes implemented inside the system drivers (such as for Windows and DJGPP); usually have the priority 100. Implemented in csGraphics2DAA, csGraphics2DGLCommon, csGraphics2DSDL, csGraphics2DXLib, and csGraphics2DSVGALib

Specified by:
queryEventPriority in interface iEventPlug
Parameters:
iType -
Returns:
See Also:
iEventPlug.queryEventPriority(int)