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

Pointer scroll event. More...

+ Inheritance diagram for LPointerScrollEvent:

Public Types

enum  Source : UInt32
 Source of a scroll event. More...
 
- 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...
 

Public Member Functions

 LPointerScrollEvent (const LPointF &axes=LPointF(0.f, 0.f), const LPointF &axes120=LPointF(0.f, 0.f), Source source=Continuous, UInt32 serial=LTime::nextSerial(), UInt32 ms=LTime::ms(), UInt64 us=LTime::us(), LInputDevice *device=nullptr) noexcept
 Constructs an LPointerScrollEvent object. More...
 
void setAxes (const LPointF &axes) noexcept
 Sets the scroll axes values. More...
 
void setAxes (Float32 x, Float32 y) noexcept
 Sets the scroll axes values. More...
 
void setX (Float32 x) noexcept
 Sets the scroll value along the x-axis. More...
 
void setY (Float32 y) noexcept
 Sets the scroll value along the y-axis. More...
 
const LPointFaxes () const noexcept
 Gets the scroll axes values. More...
 
void setAxes120 (const LPointF &axes) noexcept
 Sets the high-resolution scroll axes values. More...
 
void setAxes120 (Float32 x, Float32 y) noexcept
 Sets the high-resolution scroll axes values. More...
 
void set120X (Float32 x) noexcept
 Sets the high-resolution scroll value along the x-axis. More...
 
void set120Y (Float32 y) noexcept
 Sets the high-resolution scroll value along the y-axis. More...
 
const LPointFaxes120 () const noexcept
 Gets the high-resolution scroll axes values. More...
 
void setSource (Source source) noexcept
 Sets the source of the scroll event. More...
 
Source source () const noexcept
 Gets the source of the scroll event. 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...
 

Detailed Description

Pointer scroll event.

Member Enumeration Documentation

◆ Source

enum Source : UInt32

Source of a scroll event.

Possible sources of a scroll event.

Enumerator
Wheel 

Mouse wheel (discrete)

Finger 

Trackpad swipe (continuous)

Continuous 

Continuous movement (with unspecified source)

WheelTilt 

Side movement of a mouse wheel (since 6)

Constructor & Destructor Documentation

◆ LPointerScrollEvent()

LPointerScrollEvent ( const LPointF axes = LPointF(0.f, 0.f),
const LPointF axes120 = LPointF(0.f, 0.f),
Source  source = Continuous,
UInt32  serial = LTime::nextSerial(),
UInt32  ms = LTime::ms(),
UInt64  us = LTime::us(),
LInputDevice device = nullptr 
)
inlinenoexcept

Constructs an LPointerScrollEvent object.

Parameters
axesThe scroll axes values.
axes120The scroll axes values for high-resolution scrolling.
sourceThe source of the scroll event.
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

◆ setAxes() [1/2]

void setAxes ( const LPointF axes)
inlinenoexcept

Sets the scroll axes values.

◆ setAxes() [2/2]

void setAxes ( Float32  x,
Float32  y 
)
inlinenoexcept

Sets the scroll axes values.

◆ setX()

void setX ( Float32  x)
inlinenoexcept

Sets the scroll value along the x-axis.

◆ setY()

void setY ( Float32  y)
inlinenoexcept

Sets the scroll value along the y-axis.

◆ axes()

const LPointF& axes ( ) const
inlinenoexcept

Gets the scroll axes values.

◆ setAxes120() [1/2]

void setAxes120 ( const LPointF axes)
inlinenoexcept

Sets the high-resolution scroll axes values.

◆ setAxes120() [2/2]

void setAxes120 ( Float32  x,
Float32  y 
)
inlinenoexcept

Sets the high-resolution scroll axes values.

◆ set120X()

void set120X ( Float32  x)
inlinenoexcept

Sets the high-resolution scroll value along the x-axis.

◆ set120Y()

void set120Y ( Float32  y)
inlinenoexcept

Sets the high-resolution scroll value along the y-axis.

◆ axes120()

const LPointF& axes120 ( ) const
inlinenoexcept

Gets the high-resolution scroll axes values.

A value that is a fraction of ±120 indicates a wheel movement less than one logical click, a caller should either scroll by the respective fraction of the normal scroll distance or accumulate that value until a multiple of 120 is reached.

Note
Only for events with a Wheel source.

◆ setSource()

void setSource ( Source  source)
inlinenoexcept

Sets the source of the scroll event.

◆ source()

Source source ( ) const
inlinenoexcept

Gets the source of the scroll event.