crystalspace.jbind.impl.csutil.event
Class csEventHandler
java.lang.Object
crystalspace.jbind.impl.csNativeObject
crystalspace.jbind.impl.csutil.scf.csBase
crystalspace.jbind.impl.csutil.event.csEventHandler
- All Implemented Interfaces:
- iBase, iEventHandler, iJPointer, iPointer
- public final class csEventHandler
- extends csBase
- implements iEventHandler
- Author:
- Quentin Anciaux
Methods inherited from class java.lang.Object |
clone, getClass, notify, notifyAll, wait, wait, wait |
csEventHandler
public csEventHandler(iPointer nPointer)
csEventHandler
public csEventHandler(iPointer nPointer,
iEventHandler handler)
csEventHandler
public csEventHandler(iEventHandler handler)
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()
handleEvent
public boolean handleEvent(iEvent event)
- Description copied from interface:
iEventHandler
- This is the basic event handling function.
To receive events, a component must implement iEventHandler and register with an event queue using iEventQueue::RegisterListener(). The event handler should return true if the event was handled. Returning true prevents the event from being passed along to other event handlers. If the event was not handled, then false should be returned, in which case other event handlers are given a shot at the event. Note that broadcast events are sent to all handlers which are interested in them regardless of the return value of this method. NOTE: Do _not_ return true unless you really handled the event and want event dispatch to stop at your handler.
Implemented in csEngine::EventHandler, csBaseEventHandler, csKeyboardDriver::eiEventHandler, csMouseDriver::eiEventHandler, csJoystickDriver::eiEventHandler, csApp::csAppPlugin::eiEventHandler, csMovieRecorder::EventHandler, and csPGInputHandler.
- Specified by:
handleEvent
in interface iEventHandler
- Parameters:
event
-
- Returns:
isNativePointerValidSafe
protected boolean isNativePointerValidSafe(long pointer)
- Specified by:
isNativePointerValidSafe
in class csNativeObject
nDelete
protected void nDelete(long pointer)
- Overrides:
nDelete
in class csBase
- See Also:
csNativeObject.nDelete(long)
setHandler
public void setHandler(iEventHandler handler)