Louvre
v2.12.0-1
C++ library for Wayland compositors
|
Wrapper for native wl_resource structs. More...
Public Member Functions | |
wl_resource * | resource () const noexcept |
Retrieve the wrapped wl_resource pointer. More... | |
LClient * | client () const noexcept |
Retrieve the client that owns this resource. More... | |
Int32 | version () const noexcept |
Retrieve the version of the global interface. More... | |
UInt32 | id () const noexcept |
Retrieve the ID of the resource. More... | |
void | destroy () |
Destroy the resource. 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... | |
Protected Member Functions | |
LResource (wl_client *client, const wl_interface *interface, Int32 version, UInt32 id, const void *implementation) noexcept | |
Constructor for LResource using wl_client and other parameters. More... | |
LResource (LClient *client, const wl_interface *interface, Int32 version, UInt32 id, const void *implementation) noexcept | |
Constructor for LResource using LClient and other parameters. More... | |
~LResource () | |
Destructor for LResource. More... | |
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... | |
Wrapper for native wl_resource structs.
This class serves as a wrapper for the wl_resource struct from the original Wayland library.
Numerous objects expose their LResource objects, allowing you to utilize native Wayland methods if desired.
To explore all the globals/resources implemented by Louvre, refer to the Louvre/src/lib/protocols
directory.
|
protectednoexcept |
Constructor for LResource using wl_client and other parameters.
This constructor creates an LResource and registers it with the provided parameters.
client | The wl_client associated with the resource. |
interface | Pointer to the wl_interface provided by the protocol. |
version | Version of the global interface. |
id | ID of the resource; passing 0 automatically generates an increasing ID. |
implementation | Pointer to the interface implementation (struct with callback functions to handle client requests). |
destroy | Callback function to handle resource destruction. |
|
protectednoexcept |
Constructor for LResource using LClient and other parameters.
This constructor creates an LResource and registers it with the provided parameters.
client | The LClient associated with the resource. |
interface | Pointer to the wl_interface provided by the protocol. |
version | Version of the global interface. |
id | ID of the resource; passing 0 automatically generates an increasing ID. |
implementation | Pointer to the interface implementation (struct with callback functions to handle client requests). |
|
inlinenoexcept |
Retrieve the wrapped wl_resource pointer.
This method returns the original wl_resource pointer associated with this LResource.
|
inlinenoexcept |
|
noexcept |
Retrieve the version of the global interface.
This method returns the version of the global interface associated with this resource.
|
noexcept |
Retrieve the ID of the resource.
This method returns the ID of the resource, which is the same as calling wl_resource_get_id().
void destroy | ( | ) |
Destroy the resource.
This method destroys the resource, equivalent to calling wl_resource_destroy().