Kanzi 4.0.0-beta2
kanzi::evdev::TouchInputDeviceData Struct Reference

Struct representing touch input device data. More...

#include <kanzi/core.ui/platform/input_ng/evdev/touch_input_device_data.hpp>

Public Member Functions

KZ_NO_DISCARD int getFd () const noexcept
 Gets the file descriptor handle for this device.
 
KZ_NO_DISCARD KanziEvdevState getSyncState () const noexcept
 Gets the current sync state.
 
void handleSyncEvents (const struct input_event &ev, kanzi::EventQueue &queue)
 Handles sync events.
 
void handleTouchEvents (unsigned int width, unsigned int height, const struct input_event &ev)
 Handles touch events.
 
bool isTouchFinished () const noexcept
 Returns whether touch is finished.
 
void processTouchEvents (EventQueue &queue)
 Processes touch events.
 
void setSyncState (KanziEvdevState syncState)
 Sets the current sync state.
 
 TouchInputDeviceData (int fileDescriptor, const input_absinfo &absinfoX, const input_absinfo &absinfoY, vector< CursorData > cursorBuffer, int currentSlot)
 Constructor.
 

Detailed Description

Struct representing touch input device data.

Since
Kanzi 3.9.13

Constructor & Destructor Documentation

◆ TouchInputDeviceData()

kanzi::evdev::TouchInputDeviceData::TouchInputDeviceData ( int fileDescriptor,
const input_absinfo & absinfoX,
const input_absinfo & absinfoY,
vector< CursorData > cursorBuffer,
int currentSlot )
explicit

Constructor.

Parameters
fileDescriptorInput device file descriptor.
absinfoXTouch panel geometry for the x axis.
absinfoYTouch panel geometry for the y axis.
cursorBufferBuffer for cursor slots.
currentSlotSlot for incoming touch-events from the operating system.

Member Function Documentation

◆ getFd()

KZ_NO_DISCARD int kanzi::evdev::TouchInputDeviceData::getFd ( ) const
noexcept

Gets the file descriptor handle for this device.

Returns
File descriptor handle for this device.

◆ getSyncState()

KZ_NO_DISCARD KanziEvdevState kanzi::evdev::TouchInputDeviceData::getSyncState ( ) const
noexcept

Gets the current sync state.

Returns
Current sync state for this device.

◆ setSyncState()

void kanzi::evdev::TouchInputDeviceData::setSyncState ( KanziEvdevState syncState)

Sets the current sync state.

Parameters
syncStateSync state to set.

◆ isTouchFinished()

bool kanzi::evdev::TouchInputDeviceData::isTouchFinished ( ) const
noexcept

Returns whether touch is finished.

Returns
If touch is finished, true, otherwise false.

◆ processTouchEvents()

void kanzi::evdev::TouchInputDeviceData::processTouchEvents ( EventQueue & queue)

Processes touch events.

Parameters
queueThe queue to push new events to.

◆ handleTouchEvents()

void kanzi::evdev::TouchInputDeviceData::handleTouchEvents ( unsigned int width,
unsigned int height,
const struct input_event & ev )

Handles touch events.

Parameters
widthTouch panel width.
heightTouch panel height.
evThe event to handle.

◆ handleSyncEvents()

void kanzi::evdev::TouchInputDeviceData::handleSyncEvents ( const struct input_event & ev,
kanzi::EventQueue & queue )

Handles sync events.

Parameters
evThe event to handle.
queueThe queue to push new events to.

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