.TH "wayland::server::zxdg_surface_v6_t" 3 "Wed May 3 2023" "Version 1.0.0" "Wayland++" \" -*- nroff -*- .ad l .nh .SH NAME wayland::server::zxdg_surface_v6_t \- desktop user interface surface base interface .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 the xdg_surface " .ti -1c .RI "std::function< void(\fBzxdg_toplevel_v6_t\fP)> & \fBon_get_toplevel\fP ()" .br .RI "assign the xdg_toplevel surface role " .ti -1c .RI "std::function< void(\fBzxdg_popup_v6_t\fP, \fBzxdg_surface_v6_t\fP, \fBzxdg_positioner_v6_t\fP)> & \fBon_get_popup\fP ()" .br .RI "assign the xdg_popup surface role " .ti -1c .RI "std::function< void(int32_t, int32_t, int32_t, int32_t)> & \fBon_set_window_geometry\fP ()" .br .RI "set the new window geometry " .ti -1c .RI "std::function< void(uint32_t)> & \fBon_ack_configure\fP ()" .br .RI "ack a configure event " .ti -1c .RI "void \fBconfigure\fP (uint32_t serial, bool post=true)" .br .RI "suggest a surface change " .ti -1c .RI "void \fBpost_not_constructed\fP (std::string const &msg)" .br .RI "Post error: " .ti -1c .RI "void \fBpost_already_constructed\fP (std::string const &msg)" .br .RI "Post error: " .ti -1c .RI "void \fBpost_unconfigured_buffer\fP (std::string const &msg)" .br .RI "Post error: " .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 \fBconfigure_since_version\fP = 1" .br .RI "Minimum protocol version required for the \fBconfigure\fP function\&. " .in -1c .SH "Detailed Description" .PP desktop user interface surface base interface An interface that may be implemented by a wl_surface, for implementations that provide a desktop-style user interface\&. .PP It provides a base set of functionality required to construct user interface elements requiring management by the compositor, such as toplevel windows, menus, etc\&. The types of functionality are split into xdg_surface roles\&. .PP Creating an xdg_surface does not set the role for a wl_surface\&. In order to map an xdg_surface, the client must create a role-specific object using, e\&.g\&., get_toplevel, get_popup\&. The wl_surface for any given xdg_surface can have at most one role, and may not be assigned any role not based on xdg_surface\&. .PP A role must be assigned before any other requests are made to the xdg_surface object\&. .PP The client must call wl_surface\&.commit on the corresponding wl_surface for the xdg_surface state to take effect\&. .PP Creating an xdg_surface from a wl_surface which has a buffer attached or committed is a client error, and any attempts by a client to attach or manipulate a buffer prior to the first xdg_surface\&.configure call must also be treated as errors\&. .PP For a surface to be mapped by the compositor, the following conditions must be met: (1) the client has assigned an xdg_surface based role to the surface, (2) the client has set and committed the xdg_surface state and the role dependent state to the surface and (3) the client has committed a buffer to the surface\&. .PP Definition at line \fB9196\fP of file \fBwayland\-server\-protocol\-unstable\&.hpp\fP\&. .SH "Member Function Documentation" .PP .SS "void zxdg_surface_v6_t::configure (uint32_t serial, bool post = \fCtrue\fP)" .PP suggest a surface change .PP \fBParameters\fP .RS 4 \fIserial\fP serial of the configure event .RE .PP The configure event marks the end of a configure sequence\&. A configure sequence is a set of one or more events configuring the state of the xdg_surface, including the final xdg_surface\&.configure event\&. .PP Where applicable, xdg_surface surface roles will during a configure sequence extend this event as a latched state sent as events before the xdg_surface\&.configure event\&. Such events should be considered to make up a set of atomically applied configuration states, where the xdg_surface\&.configure commits the accumulated state\&. .PP Clients should arrange their surface for the new states, and then send an ack_configure request with the serial sent in this configure event at some point before committing the new surface\&. .PP If the client receives multiple configure events before it can respond to one, it is free to discard all but the last event it received\&. .PP Definition at line \fB8432\fP of file \fBwayland\-server\-protocol\-unstable\&.cpp\fP\&. .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(uint32_t)> & zxdg_surface_v6_t::on_ack_configure ()" .PP ack a configure event .PP \fBParameters\fP .RS 4 \fIserial\fP the serial from the configure event .RE .PP When a configure event is received, if a client commits the surface in response to the configure event, then the client must make an ack_configure request sometime before the commit request, passing along the serial of the configure event\&. .PP For instance, for toplevel surfaces the compositor might use this information to move a surface to the top left only when the client has drawn itself for the maximized or fullscreen state\&. .PP If the client receives multiple configure events before it can respond to one, it only has to ack the last configure event\&. .PP A client is not required to commit immediately after sending an ack_configure request - it may even ack_configure several times before its next surface commit\&. .PP A client may send multiple ack_configure requests before committing, but only the last request sent before a commit indicates which configure event the client really is responding to\&. .PP Definition at line \fB8426\fP of file \fBwayland\-server\-protocol\-unstable\&.cpp\fP\&. .SS "std::function< void()> & zxdg_surface_v6_t::on_destroy ()" .PP destroy the xdg_surface Destroy the xdg_surface object\&. An xdg_surface must only be destroyed after its role object has been destroyed\&. .PP Definition at line \fB8402\fP of file \fBwayland\-server\-protocol\-unstable\&.cpp\fP\&. .SS "std::function< void(\fBzxdg_popup_v6_t\fP, \fBzxdg_surface_v6_t\fP, \fBzxdg_positioner_v6_t\fP)> & zxdg_surface_v6_t::on_get_popup ()" .PP assign the xdg_popup surface role .PP \fBParameters\fP .RS 4 \fIid\fP .br \fIparent\fP .br \fIpositioner\fP .RE .PP This creates an xdg_popup object for the given xdg_surface and gives the associated wl_surface the xdg_popup role\&. .PP See the documentation of xdg_popup for more details about what an xdg_popup is and how it is used\&. .PP Definition at line \fB8414\fP of file \fBwayland\-server\-protocol\-unstable\&.cpp\fP\&. .SS "std::function< void(\fBzxdg_toplevel_v6_t\fP)> & zxdg_surface_v6_t::on_get_toplevel ()" .PP assign the xdg_toplevel surface role .PP \fBParameters\fP .RS 4 \fIid\fP .RE .PP This creates an xdg_toplevel object for the given xdg_surface and gives the associated wl_surface the xdg_toplevel role\&. .PP See the documentation of xdg_toplevel for more details about what an xdg_toplevel is and how it is used\&. .PP Definition at line \fB8408\fP of file \fBwayland\-server\-protocol\-unstable\&.cpp\fP\&. .SS "std::function< void(int32_t, int32_t, int32_t, int32_t)> & zxdg_surface_v6_t::on_set_window_geometry ()" .PP set the new window geometry .PP \fBParameters\fP .RS 4 \fIx\fP .br \fIy\fP .br \fIwidth\fP .br \fIheight\fP .RE .PP The window geometry of a surface is its 'visible bounds' from the user's perspective\&. Client-side decorations often have invisible portions like drop-shadows which should be ignored for the purposes of aligning, placing and constraining windows\&. .PP The window geometry is double buffered, and will be applied at the time wl_surface\&.commit of the corresponding wl_surface is called\&. .PP Once the window geometry of the surface is set, it is not possible to unset it, and it will remain the same until set_window_geometry is called again, even if a new subsurface or buffer is attached\&. .PP If never set, the value is the full bounds of the surface, including any subsurfaces\&. This updates dynamically on every commit\&. This unset is meant for extremely simple clients\&. .PP The arguments are given in the surface-local coordinate space of the wl_surface associated with this xdg_surface\&. .PP The width and height must be greater than zero\&. Setting an invalid size will raise an error\&. When applied, the effective window geometry will be the set window geometry clamped to the bounding rectangle of the combined geometry of the surface of the xdg_surface and the associated subsurfaces\&. .PP Definition at line \fB8420\fP of file \fBwayland\-server\-protocol\-unstable\&.cpp\fP\&. .SS "void zxdg_surface_v6_t::post_already_constructed (std::string const & msg)" .PP Post error: .PP Definition at line \fB8442\fP of file \fBwayland\-server\-protocol\-unstable\&.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 zxdg_surface_v6_t::post_not_constructed (std::string const & msg)" .PP Post error: .PP Definition at line \fB8437\fP of file \fBwayland\-server\-protocol\-unstable\&.cpp\fP\&. .SS "void zxdg_surface_v6_t::post_unconfigured_buffer (std::string const & msg)" .PP Post error: .PP Definition at line \fB8447\fP of file \fBwayland\-server\-protocol\-unstable\&.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::zxdg_surface_v6_t::configure_since_version = 1\fC [static]\fP, \fC [constexpr]\fP" .PP Minimum protocol version required for the \fBconfigure\fP function\&. .PP Definition at line \fB9345\fP of file \fBwayland\-server\-protocol\-unstable\&.hpp\fP\&. .SH "Author" .PP Generated automatically by Doxygen for Wayland++ from the source code\&.