Kanzi  3.9.7
Kanzi Engine API
kanzi::InputEvent Class Reference

Base event class providing the core functionality of the Kanzi input events. More...

#include <kanzi/core.ui/platform/input/common/events.hpp>

Inheritance diagram for kanzi::InputEvent:
[legend]

Public Types

enum  Type {
  Key, Pointer, Touch, WindowResized,
  WindowResizeRequest, WindowFocusLost, WindowFocusGained, WindowHidden,
  WindowResourcesLost, WindowOrientationChanged, WindowRedrawRequest, WindowPlacement,
  WindowClosed, ApplicationPaused, ApplicationSleep, ApplicationWakeup,
  DebugToggleHud, DebugSetHud, UserEvent
}
 InputEvent type enumeration. More...
 

Public Member Functions

Type getType () const
 Returns the type of the event. More...
 
 InputEvent (Type type)
 Constructs an event with a given type. More...
 
bool isHandled () const
 Returns true if the event is handled, false if not. More...
 
void markHandled ()
 Marks the event as handled. More...
 
virtual ~InputEvent ()
 Destructor. More...
 

Detailed Description

Base event class providing the core functionality of the Kanzi input events.

Declares the core event types used in Kanzi.

Use this class to create events that, in addition to the even type, do not require arguments. For example, the events InputEvent::ApplicationPaused, InputEvent::ApplicationSleep, InputEvent::ApplicationWakeup, and InputEvent::DebugToggleHud do not have a specialized event class, because they do not have additional arguments.

Mark the event handled by calling markHandled() method. An event marked as handled is is excluded from other event handlers.

Member Enumeration Documentation

InputEvent type enumeration.

Enumerator
Key 

Identifies a key event. Dispatched through KeyEvent.

Pointer 

Identifies pointer actions. Dispatched through PointerEvent.

Touch 

Identifies a touch event. Dispatched through TouchEvent.

WindowResized 

Reports that a window was resized. Dispatched through WindowResizedEvent.

WindowResizeRequest 

Identifies the window resize request event. Dispatched through WindowResizeRequestEvent.

WindowFocusLost 

Reports that the window it refers to lost input focus, but it can be still completely or partially visible.

Dispatched through WindowEvent.

WindowFocusGained 

Reports that the window it refers to gained input focus and is fully visible.

Dispatched through WindowEvent.

WindowHidden 

Reports that the window it refers to was minimized or completely hidden, or a power saver or screen saver is enabled.

Dispatched through WindowEvent.

WindowResourcesLost 

Reports that the window it refers to lost the resources it used.

To recover the application, restart or reinitialize it. Dispatched through WindowEvent.

WindowOrientationChanged 

Reports that the orientation of display or window changed.

Dispatched through OrientationChangedEvent.

WindowRedrawRequest 

Identifies the window redraw request event. Dispatched through WindowRedrawRequestEvent.

WindowPlacement 

Identifies the window placement request event.

Dispatched through WindowPlacementRequestEvent.

Since
Kanzi 3.9.7
WindowClosed 

Reports that the window it refers to was closed.

Dispatched through WindowEvent.

ApplicationPaused 

Reports that the application is paused. Dispatched through InputEvent.

ApplicationSleep 

Reports that the operating system put the application to sleep.

Dispatched through InputEvent.

ApplicationWakeup 

Reports that the operating system woke up the application.

Dispatched through InputEvent.

DebugToggleHud 

Toggles the head-up display debugging. Dispatched through InputEvent.

DebugSetHud 

Sets the head-up display debug request. Dispatched through HudDebugEvent.

UserEvent 

Specifies the limit from which Kanzi registers the user-defined events.

Constructor & Destructor Documentation

kanzi::InputEvent::InputEvent ( Type  type)
explicit

Constructs an event with a given type.

Parameters
typeThe event type.
virtual kanzi::InputEvent::~InputEvent ( )
virtual

Destructor.

Member Function Documentation

Type kanzi::InputEvent::getType ( ) const

Returns the type of the event.

bool kanzi::InputEvent::isHandled ( ) const

Returns true if the event is handled, false if not.

void kanzi::InputEvent::markHandled ( )

Marks the event as handled.


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