.TH "wayland::server::xdg_wm_base_t" 3 "Wed May 1 2024 17:27:19" "Version 1.0.0" "Wayland++" \" -*- nroff -*- .ad l .nh .SH NAME wayland::server::xdg_wm_base_t \- create desktop-style surfaces .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()> & \fBon_destroy\fP ()" .br .RI "destroy xdg_wm_base " .ti -1c .RI "std::function< void(\fBxdg_positioner_t\fP)> & \fBon_create_positioner\fP ()" .br .RI "create a positioner object " .ti -1c .RI "std::function< void(\fBxdg_surface_t\fP, \fBsurface_t\fP)> & \fBon_get_xdg_surface\fP ()" .br .RI "create a shell surface from a surface " .ti -1c .RI "std::function< void(uint32_t)> & \fBon_pong\fP ()" .br .RI "respond to a ping event " .ti -1c .RI "void \fBping\fP (uint32_t serial, bool post=true)" .br .RI "check if the client is alive " .ti -1c .RI "void \fBpost_role\fP (std::string const &msg)" .br .RI "Post error: given wl_surface has another role\&. " .ti -1c .RI "void \fBpost_defunct_surfaces\fP (std::string const &msg)" .br .RI "Post error: xdg_wm_base was destroyed before children\&. " .ti -1c .RI "void \fBpost_not_the_topmost_popup\fP (std::string const &msg)" .br .RI "Post error: the client tried to map or destroy a non-topmost popup\&. " .ti -1c .RI "void \fBpost_invalid_popup_parent\fP (std::string const &msg)" .br .RI "Post error: the client specified an invalid popup parent surface\&. " .ti -1c .RI "void \fBpost_invalid_surface_state\fP (std::string const &msg)" .br .RI "Post error: the client provided an invalid surface state\&. " .ti -1c .RI "void \fBpost_invalid_positioner\fP (std::string const &msg)" .br .RI "Post error: the client provided an invalid positioner\&. " .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 \fBping_since_version\fP = 1" .br .RI "Minimum protocol version required for the \fBping\fP function\&. " .in -1c .SH "Detailed Description" .PP create desktop-style surfaces The xdg_wm_base interface is exposed as a global object enabling clients to turn their wl_surfaces into windows in a desktop environment\&. It defines the basic functionality needed for clients and the compositor to create windows that can be dragged, resized, maximized, etc, as well as creating transient windows such as popup menus\&. .PP Definition at line \fB613\fP of file \fBwayland\-server\-protocol\-extra\&.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 "std::function< void(\fBxdg_positioner_t\fP)> & xdg_wm_base_t::on_create_positioner ()" .PP create a positioner object .PP \fBParameters\fP .RS 4 \fIid\fP .RE .PP Create a positioner object\&. A positioner object is used to position surfaces relative to some parent surface\&. See the interface description and xdg_surface\&.get_popup for details\&. .PP Definition at line \fB930\fP of file \fBwayland\-server\-protocol\-extra\&.cpp\fP\&. .SS "std::function< void()> & xdg_wm_base_t::on_destroy ()" .PP destroy xdg_wm_base Destroy this xdg_wm_base object\&. .PP Destroying a bound xdg_wm_base object while there are surfaces still alive created by this xdg_wm_base object instance is illegal and will result in a protocol error\&. .PP Definition at line \fB924\fP of file \fBwayland\-server\-protocol\-extra\&.cpp\fP\&. .SS "std::function< void(\fBxdg_surface_t\fP, \fBsurface_t\fP)> & xdg_wm_base_t::on_get_xdg_surface ()" .PP create a shell surface from a surface .PP \fBParameters\fP .RS 4 \fIid\fP .br \fIsurface\fP .RE .PP This creates an xdg_surface for the given surface\&. While xdg_surface itself is not a role, the corresponding surface may only be assigned a role extending xdg_surface, such as xdg_toplevel or xdg_popup\&. It is illegal to create an xdg_surface for a wl_surface which already has an assigned role and this will result in a protocol error\&. .PP This creates an xdg_surface for the given surface\&. An xdg_surface is used as basis to define a role to a given surface, such as xdg_toplevel or xdg_popup\&. It also manages functionality shared between xdg_surface based surface roles\&. .PP See the documentation of xdg_surface for more details about what an xdg_surface is and how it is used\&. .PP Definition at line \fB936\fP of file \fBwayland\-server\-protocol\-extra\&.cpp\fP\&. .SS "std::function< void(uint32_t)> & xdg_wm_base_t::on_pong ()" .PP respond to a ping event .PP \fBParameters\fP .RS 4 \fIserial\fP serial of the ping event .RE .PP A client must respond to a ping event with a pong request or the client may be deemed unresponsive\&. See xdg_wm_base\&.ping\&. .PP Definition at line \fB942\fP of file \fBwayland\-server\-protocol\-extra\&.cpp\fP\&. .SS "void xdg_wm_base_t::ping (uint32_t serial, bool post = \fCtrue\fP)" .PP check if the client is alive .PP \fBParameters\fP .RS 4 \fIserial\fP pass this to the pong request .RE .PP The ping event asks the client if it's still alive\&. Pass the serial specified in the event back to the compositor by sending a 'pong' request back with the specified serial\&. See xdg_wm_base\&.pong\&. .PP Compositors can use this to determine if the client is still alive\&. It's unspecified what will happen if the client doesn't respond to the ping request, or in what timeframe\&. Clients should try to respond in a reasonable amount of time\&. .PP A compositor is free to ping in any way it wants, but a client must always respond to any xdg_wm_base object it created\&. .PP Definition at line \fB948\fP of file \fBwayland\-server\-protocol\-extra\&.cpp\fP\&. .SS "void xdg_wm_base_t::post_defunct_surfaces (std::string const & msg)" .PP Post error: xdg_wm_base was destroyed before children\&. .PP Definition at line \fB958\fP of file \fBwayland\-server\-protocol\-extra\&.cpp\fP\&. .SS "void xdg_wm_base_t::post_invalid_popup_parent (std::string const & msg)" .PP Post error: the client specified an invalid popup parent surface\&. .PP Definition at line \fB968\fP of file \fBwayland\-server\-protocol\-extra\&.cpp\fP\&. .SS "void xdg_wm_base_t::post_invalid_positioner (std::string const & msg)" .PP Post error: the client provided an invalid positioner\&. .PP Definition at line \fB978\fP of file \fBwayland\-server\-protocol\-extra\&.cpp\fP\&. .SS "void xdg_wm_base_t::post_invalid_surface_state (std::string const & msg)" .PP Post error: the client provided an invalid surface state\&. .PP Definition at line \fB973\fP of file \fBwayland\-server\-protocol\-extra\&.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 "void xdg_wm_base_t::post_not_the_topmost_popup (std::string const & msg)" .PP Post error: the client tried to map or destroy a non-topmost popup\&. .PP Definition at line \fB963\fP of file \fBwayland\-server\-protocol\-extra\&.cpp\fP\&. .SS "void xdg_wm_base_t::post_role (std::string const & msg)" .PP Post error: given wl_surface has another role\&. .PP Definition at line \fB953\fP of file \fBwayland\-server\-protocol\-extra\&.cpp\fP\&. .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::xdg_wm_base_t::ping_since_version = 1\fC [static]\fP, \fC [constexpr]\fP" .PP Minimum protocol version required for the \fBping\fP function\&. .PP Definition at line \fB713\fP of file \fBwayland\-server\-protocol\-extra\&.hpp\fP\&. .SH "Author" .PP Generated automatically by Doxygen for Wayland++ from the source code\&.