Louvre
v2.12.0-1
C++ library for Wayland compositors
|
Encapsulates parameters used in a set cursor request. More...
Public Member Functions | |
bool | visible () const noexcept |
Indicates if the client wants to hide the cursor. More... | |
const LPointerEnterEvent & | triggeringEvent () const noexcept |
Returns the pointer enter event sent to the client that initiated the cursor request. More... | |
LCursorRole * | cursorRole () const noexcept |
Returns the LCursorRole the client used for this cursor. More... | |
LClient * | client () const noexcept |
Returns the client owning the cursor. More... | |
Public Member Functions inherited from LObject | |
LObject (const LObject &) noexcept | |
Copy constructor. More... | |
LObject & | operator= (const LObject &) noexcept |
Assignment operator (each object has its own individual LWeak reference count). More... | |
void | setUserData (UIntPtr data) const noexcept |
Store an unsigned integer value/pointer. More... | |
UIntPtr | userData () const noexcept |
Retrieves the stored unsigned integer value/pointer. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from LObject | |
LObject () noexcept=default | |
Constructor of the LObject class. More... | |
virtual | ~LObject () noexcept |
Destructor of the LObject class. More... | |
void | notifyDestruction () noexcept |
Notifies the object destruction. More... | |
Encapsulates parameters used in a set cursor request.
The LClientCursor class encapsulates the parameters requested by the client through LPointer::setCursorRequest().
You can retrieve the last cursor request for a specific client using LClient::lastCursorRequest().
Clients create an LCursorRole for the compositor to use as the cursor. This class holds a reference to the role along with the LPointerEnterEvent that triggered the request.
Additionally, it includes a property indicating whether the client intends to hide the cursor or not.
This information gets overridden when the same client makes another LPointer::setCursorRequest() or when the associated LCursorRole is destroyed.
When assigned to an LCursor through LCursor::setCursor(), the LCursor's texture and hotspot automatically change based on the values of the associated LCursorRole. However, the cursor size remains user-defined.
If the LCursorRole surface is unmapped or destroyed after being assigned to an LCursor, the default cursor is automatically restored.
|
inlinenoexcept |
Indicates if the client wants to hide the cursor.
Returns true
if the client has never made a set cursor request. If the LCursorRole is destroyed and this method returns true
, and one of the client surfaces has pointer focus, then the default cursor should be restored.
true
if the client intends to hide the cursor, false
otherwise.
|
inlinenoexcept |
Returns the pointer enter event sent to the client that initiated the cursor request.
|
inlinenoexcept |
Returns the LCursorRole the client used for this cursor.
If the user has never made a set cursor request or the LCursorRole was destroyed, this returns nullptr
.
nullptr
if no set cursor request has been made or the LCursorRole is destroyed.