.TH "wayland::server::registry_t" 3 "Wed May 1 2024 17:27:19" "Version 1.0.0" "Wayland++" \" -*- nroff -*- .ad l .nh .SH NAME wayland::server::registry_t \- global registry object .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits wayland::server::resource_t\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "std::function< void(uint32_t, resource_t)> & \fBon_bind\fP ()" .br .RI "bind an object to the display " .ti -1c .RI "void \fBglobal\fP (uint32_t name, std::string const &interface, uint32_t version, bool post=true)" .br .RI "announce global object " .ti -1c .RI "void \fBglobal_remove\fP (uint32_t name, bool post=true)" .br .RI "announce removal of global object " .ti -1c .RI "bool \fBproxy_has_object\fP () const" .br .RI "Check whether this wrapper actually wraps an object\&. " .ti -1c .RI "void \fBpost_no_memory\fP () const" .br .ti -1c .RI "uint32_t \fBget_id\fP () const" .br .ti -1c .RI "client_t \fBget_client\fP () const" .br .ti -1c .RI "unsigned int \fBget_version\fP () const" .br .ti -1c .RI "std::string \fBget_class\fP ()" .br .in -1c .SS "Static Public Attributes" .in +1c .ti -1c .RI "static constexpr std::uint32_t \fBglobal_since_version\fP = 1" .br .RI "Minimum protocol version required for the \fBglobal\fP function\&. " .ti -1c .RI "static constexpr std::uint32_t \fBglobal_remove_since_version\fP = 1" .br .RI "Minimum protocol version required for the \fBglobal_remove\fP function\&. " .in -1c .SH "Detailed Description" .PP global registry object The singleton global registry object\&. The server has a number of global objects that are available to all clients\&. These objects typically represent an actual object in the server (for example, an input device) or they are singleton objects that provide extension functionality\&. .PP When a client creates a registry object, the registry object will emit a global event for each global currently in the registry\&. Globals come and go as a result of device or monitor hotplugs, reconfiguration or other events, and the registry will send out global and global_remove events to keep the client up to date with the changes\&. To mark the end of the initial burst of events, the client can use the wl_display\&.sync request immediately after calling wl_display\&.get_registry\&. .PP A client can bind to a global object by using the bind request\&. This creates a client-side handle that lets the object emit events to the client and lets the client invoke requests on the object\&. .PP Definition at line \fB133\fP of file \fBwayland\-server\-protocol\&.hpp\fP\&. .SH "Member Function Documentation" .PP .SS "std::string wayland::server::resource_t::get_class ()\fC [inherited]\fP" Retrieve the interface name (class) of a resource object\&. .PP \fBReturns\fP .RS 4 Interface name of the resource object\&. .RE .PP .SS "client_t wayland::server::resource_t::get_client () const\fC [inherited]\fP" Get the associated client .PP \fBReturns\fP .RS 4 the client that owns the resource\&. .RE .PP .SS "uint32_t wayland::server::resource_t::get_id () const\fC [inherited]\fP" Get the internal ID of the resource .PP \fBReturns\fP .RS 4 the internal ID of the resource .RE .PP .SS "unsigned int wayland::server::resource_t::get_version () const\fC [inherited]\fP" Get interface version .PP \fBReturns\fP .RS 4 Interface version this resource has been constructed with\&. .RE .PP .SS "void registry_t::global (uint32_t name, std::string const & interface, uint32_t version, bool post = \fCtrue\fP)" .PP announce global object .PP \fBParameters\fP .RS 4 \fIname\fP numeric name of the global object .br \fIinterface\fP interface implemented by the object .br \fIversion\fP interface version .RE .PP Notify the client of global objects\&. .PP The event notifies the client that a global object with the given name is now available, and it implements the given version of the given interface\&. .PP Definition at line \fB1576\fP of file \fBwayland\-server\-protocol\&.cpp\fP\&. .SS "void registry_t::global_remove (uint32_t name, bool post = \fCtrue\fP)" .PP announce removal of global object .PP \fBParameters\fP .RS 4 \fIname\fP numeric name of the global object .RE .PP Notify the client of removed global objects\&. .PP This event notifies the client that the global identified by name is no longer available\&. If the client bound to the global using the bind request, the client should now destroy that object\&. .PP The object remains valid and requests to the object will be ignored until the client destroys it, to avoid races between the global going away and a client sending a request to it\&. .PP Definition at line \fB1581\fP of file \fBwayland\-server\-protocol\&.cpp\fP\&. .SS "std::function< void(uint32_t, resource_t)> & registry_t::on_bind ()" .PP bind an object to the display .PP \fBParameters\fP .RS 4 \fIname\fP unique numeric name of the object .br \fIid\fP bounded object .RE .PP Binds a new, client-created object to the server using the specified name as the identifier\&. .PP Definition at line \fB1570\fP of file \fBwayland\-server\-protocol\&.cpp\fP\&. .SS "void wayland::server::resource_t::post_no_memory () const\fC [inherited]\fP" Post 'not enough memory' error to the client .PP If the compositor has not enough memory to fulfill a certail request of the client, this function can be called to notify the client of this circumstance\&. .SS "bool wayland::server::resource_t::proxy_has_object () const\fC [inherited]\fP" .PP Check whether this wrapper actually wraps an object\&. .PP \fBReturns\fP .RS 4 true if there is an underlying object, false if this wrapper is empty .RE .PP .SH "Member Data Documentation" .PP .SS "constexpr std::uint32_t wayland::server::registry_t::global_remove_since_version = 1\fC [static]\fP, \fC [constexpr]\fP" .PP Minimum protocol version required for the \fBglobal_remove\fP function\&. .PP Definition at line \fB206\fP of file \fBwayland\-server\-protocol\&.hpp\fP\&. .SS "constexpr std::uint32_t wayland::server::registry_t::global_since_version = 1\fC [static]\fP, \fC [constexpr]\fP" .PP Minimum protocol version required for the \fBglobal\fP function\&. .PP Definition at line \fB185\fP of file \fBwayland\-server\-protocol\&.hpp\fP\&. .SH "Author" .PP Generated automatically by Doxygen for Wayland++ from the source code\&.