Louvre  v2.9.0-1
C++ library for Wayland compositors
Public Types | Public Member Functions | List of all members
LEvent Class Reference

Base class for events. More...

+ Inheritance diagram for LEvent:

Public Types

enum class  Type : UInt8
 Defines the type of event. More...
 
enum class  Subtype : UInt8
 Defines the subtype of event. More...
 

Public Member Functions

 ~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...
 

Detailed Description

Base class for events.

Member Enumeration Documentation

◆ Type

enum Type : UInt8
strong

Defines the type of event.

Enumerator
Pointer 

Pointer event type.

Keyboard 

Keyboard event type.

Touch 

Touch event type.

◆ Subtype

enum Subtype : UInt8
strong

Defines the subtype of event.

Enumerator
Enter 

Enter event subtype.

Leave 

Leave event subtype.

Up 

Up event subtype.

Down 

Down event subtype.

Move 

Move event subtype.

Button 

Button event subtype.

Key 

Key event subtype.

Modifiers 

Modifiers event subtype.

Scroll 

Scroll event subtype.

Frame 

Frame event subtype.

Cancel 

Cancel event subtype.

SwipeBegin 

SwipeBegin event subtype.

SwipeUpdate 

SwipeUpdate event subtype.

SwipeEnd 

SwipeEnd event subtype.

PinchBegin 

PinchBegin event subtype.

PinchUpdate 

PinchUpdate event subtype.

PinchEnd 

PinchEnd event subtype.

HoldBegin 

HoldBegin event subtype.

HoldEnd 

HoldEnd event subtype.

Constructor & Destructor Documentation

◆ ~LEvent()

~LEvent ( )
defaultnoexcept

Destructor.

Member Function Documentation

◆ type()

Type type ( ) const
inlinenoexcept

Retrieves the type of the event.

◆ subtype()

Subtype subtype ( ) const
inlinenoexcept

Retrieves the subtype of the event.

◆ setSerial()

void setSerial ( UInt32  serial)
inlinenoexcept

Sets the serial of the event.

◆ serial()

UInt32 serial ( ) const
inlinenoexcept

Retrieves the serial of the event.

◆ setMs()

void setMs ( UInt32  ms)
inlinenoexcept

Sets the time the event was generated in milliseconds.

◆ ms()

UInt32 ms ( ) const
inlinenoexcept

Retrieves the time the event was generated in milliseconds.

◆ setUs()

void setUs ( UInt32  us)
inlinenoexcept

Sets the time the event was generated in microseconds.

◆ us()

UInt64 us ( ) const
inlinenoexcept

Retrieves the time the event was generated in microseconds.

◆ copy()

LEvent * copy ( ) const
noexcept

Creates a deep copy of the event.

Returns
A pointer to the copied event.
Note
The returned event must be deleted when no longer used.