Louvre  v2.12.0-1
C++ library for Wayland compositors
Public Member Functions | Public Attributes | List of all members
LTouchDownEvent Class Referencefinal

Touch down event. More...

+ Inheritance diagram for LTouchDownEvent:

Public Member Functions

 LTouchDownEvent (Int32 id=0, const LPointF &pos=LPointF(0.f, 0.f), UInt32 serial=LTime::nextSerial(), UInt32 ms=LTime::ms(), UInt64 us=LTime::us(), LInputDevice *device=nullptr) noexcept
 Constructs an LTouchDownEvent object. More...
 
void setPos (const LPointF &pos) noexcept
 Sets the position of the touch point. More...
 
void setPos (Float32 x, Float32 y) noexcept
 Sets the position of the touch point. More...
 
void setX (Float32 x) noexcept
 Sets the x-coordinate of the touch point position. More...
 
void setY (Float32 y) noexcept
 Sets the y-coordinate of the touch point position. More...
 
const LPointFpos () const noexcept
 Gets the position of the touch point. More...
 
void setId (Int32 id) noexcept
 Sets the unique identifier of the touch point. More...
 
Int32 id () const noexcept
 Gets the unique identifier of the touch point. More...
 
- Public Member Functions inherited from LTouchEvent
Int32 id () const noexcept
 Gets the unique identifier of the touch point. More...
 
- Public Member Functions inherited from LInputEvent
void setDevice (LInputDevice *device) noexcept
 Sets the input device that originated the event. More...
 
LInputDevicedevice () const noexcept
 Gets the input device that originated this event. More...
 
- Public Member Functions inherited from LEvent
 ~LEvent () noexcept=default
 Destructor. More...
 
Type type () const noexcept
 Retrieves the type of the event. More...
 
Subtype subtype () const noexcept
 Retrieves the subtype of the event. More...
 
void setSerial (UInt32 serial) noexcept
 Sets the serial of the event. More...
 
UInt32 serial () const noexcept
 Retrieves the serial of the event. More...
 
void setMs (UInt32 ms) noexcept
 Sets the time the event was generated in milliseconds. More...
 
UInt32 ms () const noexcept
 Retrieves the time the event was generated in milliseconds. More...
 
void setUs (UInt32 us) noexcept
 Sets the time the event was generated in microseconds. More...
 
UInt64 us () const noexcept
 Retrieves the time the event was generated in microseconds. More...
 
LEventcopy () const noexcept
 Creates a deep copy of the event. More...
 

Public Attributes

LPointF localPos
 The surface or view local position where the touch point is positioned in surface coordinates. More...
 

Additional Inherited Members

- Public Types inherited from LEvent
enum class  Type : UInt8
 Defines the type of event. More...
 
enum class  Subtype : UInt8
 Defines the subtype of event. More...
 

Detailed Description

Touch down event.

Constructor & Destructor Documentation

◆ LTouchDownEvent()

LTouchDownEvent ( Int32  id = 0,
const LPointF pos = LPointF(0.f, 0.f),
UInt32  serial = LTime::nextSerial(),
UInt32  ms = LTime::ms(),
UInt64  us = LTime::us(),
LInputDevice device = nullptr 
)
inlinenoexcept

Constructs an LTouchDownEvent object.

Parameters
idThe unique identifier of the touch point.
posThe position of the touch point [0, 1].
serialThe serial number of the event.
msThe millisecond timestamp of the event.
usThe microsecond timestamp of the event.
deviceThe input device that originated the event.

Member Function Documentation

◆ setPos() [1/2]

void setPos ( const LPointF pos)
inlinenoexcept

Sets the position of the touch point.

◆ setPos() [2/2]

void setPos ( Float32  x,
Float32  y 
)
inlinenoexcept

Sets the position of the touch point.

◆ setX()

void setX ( Float32  x)
inlinenoexcept

Sets the x-coordinate of the touch point position.

◆ setY()

void setY ( Float32  y)
inlinenoexcept

Sets the y-coordinate of the touch point position.

◆ pos()

const LPointF& pos ( ) const
inlinenoexcept

Gets the position of the touch point.

Note
The position is typically normalized to the range [0, 1] for both axes.

◆ setId()

void setId ( Int32  id)
inlinenoexcept

Sets the unique identifier of the touch point.

◆ id()

Int32 id ( ) const
inlinenoexcept

Gets the unique identifier of the touch point.

Member Data Documentation

◆ localPos

LPointF localPos
mutable

The surface or view local position where the touch point is positioned in surface coordinates.