![]() |
Louvre v2.18.1-1
C++ library for Wayland compositors
|
Encapsulates parameters used in a set cursor request. More...
#include <LClientCursor.h>
Inheritance diagram for LClientCursor:Public Member Functions | |
| bool | visible () const noexcept |
| Indicates if the client wants to hide the cursor. | |
| const LPointerEnterEvent & | triggeringEvent () const noexcept |
| Returns the pointer enter event sent to the client that initiated the cursor request. | |
| LCursorRole * | cursorRole () const noexcept |
| Returns the LCursorRole the client used for this cursor. | |
| LClient * | client () const noexcept |
| Returns the client owning the cursor. | |
Public Member Functions inherited from LObject | |
| LObject (const LObject &) noexcept | |
| Copy constructor. | |
| LObject & | operator= (const LObject &) noexcept |
| Assignment operator (each object has its own individual LWeak reference count). | |
| void | setUserData (UIntPtr data) const noexcept |
| Store an unsigned integer value/pointer. | |
| UIntPtr | userData () const noexcept |
| Retrieves the stored unsigned integer value/pointer. | |
Additional Inherited Members | |
Protected Member Functions inherited from LObject | |
| LObject () noexcept=default | |
| Constructor of the LObject class. | |
| virtual | ~LObject () noexcept |
| Destructor of the LObject class. | |
| void | notifyDestruction () noexcept |
| Notifies the object destruction. | |
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.