nCine 2025.06.r503-ff15d8d
A cross-platform 2D game engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ncine::IInputEventHandler Class Reference

The interface class for handling input events from keyboard, screen touches, mouse, accelerometer and joystick. More...

#include <IInputEventHandler.h>

Public Member Functions

virtual void onKeyPressed (const KeyboardEvent &event)
 Callback function called every time a key is pressed.
 
virtual void onKeyReleased (const KeyboardEvent &event)
 Callback function called every time a key is released.
 
virtual void onTextInput (const TextInputEvent &event)
 Callback function called every time a text input is generated.
 
virtual void onTouchDown (const TouchEvent &event)
 Callback function called every time the first screen touch is made.
 
virtual void onTouchUp (const TouchEvent &event)
 Callback function called every time the last screen touch is released.
 
virtual void onTouchMove (const TouchEvent &event)
 Callback function called every time a screen touch is moved.
 
virtual void onPointerDown (const TouchEvent &event)
 Callback function called every time a screen touch different than the first one is made.
 
virtual void onPointerUp (const TouchEvent &event)
 Callback function called every time a screen touch different than the last one is released.
 
virtual void onMouseButtonPressed (const MouseEvent &event)
 Callback function called every time a mouse button is pressed.
 
virtual void onMouseButtonReleased (const MouseEvent &event)
 Callback function called every time a mouse button is released.
 
virtual void onMouseMoved (const MouseState &state)
 Callback function called every time the mouse is moved.
 
virtual void onScrollInput (const ScrollEvent &event)
 Callback function called every time a scroll input occurs (mouse wheel, touchpad gesture, etc.)
 
virtual void onJoyButtonPressed (const JoyButtonEvent &event)
 Callback function called every time a joystick button is pressed.
 
virtual void onJoyButtonReleased (const JoyButtonEvent &event)
 Callback function called every time a joystick button is released.
 
virtual void onJoyHatMoved (const JoyHatEvent &event)
 Callback function called every time a joystick hat is moved.
 
virtual void onJoyAxisMoved (const JoyAxisEvent &event)
 Callback function called every time a joystick axis is moved.
 
virtual void onJoyMappedButtonPressed (const JoyMappedButtonEvent &event)
 Callback function called every time a button of a joystick with mapping is pressed.
 
virtual void onJoyMappedButtonReleased (const JoyMappedButtonEvent &event)
 Callback function called every time a button of a joystick with mapping is released.
 
virtual void onJoyMappedAxisMoved (const JoyMappedAxisEvent &event)
 Callback function called every time an axis of a joystick with mapping is moved.
 
virtual void onJoyConnected (const JoyConnectionEvent &event)
 Callback function called every time a joystick is connected.
 
virtual void onJoyDisconnected (const JoyConnectionEvent &event)
 Callback function called every time a joystick is disconnected.
 
virtual void onFilesDropped (const DropEvent &event)
 Callback function called every time some files or directories are dropped on the window.
 
virtual bool onQuitRequest ()
 Callback function called when the system sends a quit event, for example when the user clicks the window close button.
 

Detailed Description

The interface class for handling input events from keyboard, screen touches, mouse, accelerometer and joystick.

Member Function Documentation

◆ onQuitRequest()

virtual bool ncine::IInputEventHandler::onQuitRequest ( )
inlinevirtual

Callback function called when the system sends a quit event, for example when the user clicks the window close button.

Returns
True if the application should quit

The documentation for this class was generated from the following file: