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

Base class for input events. More...

+ Inheritance diagram for LInputEvent:

Public Member Functions

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

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

Base class for input events.

Member Function Documentation

◆ setDevice()

void setDevice ( LInputDevice device)
noexcept

Sets the input device that originated the event.

Parameters
deviceIf nullptr is passed, a generic fake input device is assigned.

◆ device()

LInputDevice* device ( ) const
inlinenoexcept

Gets the input device that originated this event.