.TH "wayland::server::zxdg_toplevel_decoration_v1_t" 3 "Wed May 1 2024 17:27:19" "Version 1.0.0" "Wayland++" \" -*- nroff -*- .ad l .nh .SH NAME wayland::server::zxdg_toplevel_decoration_v1_t \- decoration object for a toplevel surface .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 decoration object " .ti -1c .RI "std::function< void(zxdg_toplevel_decoration_v1_mode)> & \fBon_set_mode\fP ()" .br .RI "set the decoration mode " .ti -1c .RI "std::function< void()> & \fBon_unset_mode\fP ()" .br .RI "unset the decoration mode " .ti -1c .RI "void \fBconfigure\fP (zxdg_toplevel_decoration_v1_mode const &mode, bool post=true)" .br .RI "suggest a surface change " .ti -1c .RI "void \fBpost_unconfigured_buffer\fP (std::string const &msg)" .br .RI "Post error: xdg_toplevel has a buffer attached before configure\&. " .ti -1c .RI "void \fBpost_already_constructed\fP (std::string const &msg)" .br .RI "Post error: xdg_toplevel already has a decoration object\&. " .ti -1c .RI "void \fBpost_orphaned\fP (std::string const &msg)" .br .RI "Post error: xdg_toplevel destroyed before the decoration 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 \fBconfigure_since_version\fP = 1" .br .RI "Minimum protocol version required for the \fBconfigure\fP function\&. " .in -1c .SH "Detailed Description" .PP decoration object for a toplevel surface The decoration object allows the compositor to toggle server-side window decorations for a toplevel surface\&. The client can request to switch to another mode\&. .PP The xdg_toplevel_decoration object must be destroyed before its xdg_toplevel\&. .PP Definition at line \fB7811\fP of file \fBwayland\-server\-protocol\-unstable\&.hpp\fP\&. .SH "Member Function Documentation" .PP .SS "void zxdg_toplevel_decoration_v1_t::configure (zxdg_toplevel_decoration_v1_mode const & mode, bool post = \fCtrue\fP)" .PP suggest a surface change .PP \fBParameters\fP .RS 4 \fImode\fP the decoration mode .RE .PP The configure event asks the client to change its decoration mode\&. The configured state should not be applied immediately\&. Clients must send an ack_configure in response to this event\&. See xdg_surface\&.configure and xdg_surface\&.ack_configure for details\&. .PP A configure event can be sent at any time\&. The specified mode must be obeyed by the client\&. .PP Definition at line \fB7626\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()> & zxdg_toplevel_decoration_v1_t::on_destroy ()" .PP destroy the decoration object Switch back to a mode without any server-side decorations at the next commit\&. .PP Definition at line \fB7608\fP of file \fBwayland\-server\-protocol\-unstable\&.cpp\fP\&. .SS "std::function< void(zxdg_toplevel_decoration_v1_mode)> & zxdg_toplevel_decoration_v1_t::on_set_mode ()" .PP set the decoration mode .PP \fBParameters\fP .RS 4 \fImode\fP the decoration mode .RE .PP Set the toplevel surface decoration mode\&. This informs the compositor that the client prefers the provided decoration mode\&. .PP After requesting a decoration mode, the compositor will respond by emitting an xdg_surface\&.configure event\&. The client should then update its content, drawing it without decorations if the received mode is server-side decorations\&. The client must also acknowledge the configure when committing the new content (see xdg_surface\&.ack_configure)\&. .PP The compositor can decide not to use the client's mode and enforce a different mode instead\&. .PP Clients whose decoration mode depend on the xdg_toplevel state may send a set_mode request in response to an xdg_surface\&.configure event and wait for the next xdg_surface\&.configure event to prevent unwanted state\&. Such clients are responsible for preventing configure loops and must make sure not to send multiple successive set_mode requests with the same decoration mode\&. .PP Definition at line \fB7614\fP of file \fBwayland\-server\-protocol\-unstable\&.cpp\fP\&. .SS "std::function< void()> & zxdg_toplevel_decoration_v1_t::on_unset_mode ()" .PP unset the decoration mode Unset the toplevel surface decoration mode\&. This informs the compositor that the client doesn't prefer a particular decoration mode\&. .PP This request has the same semantics as set_mode\&. .PP Definition at line \fB7620\fP of file \fBwayland\-server\-protocol\-unstable\&.cpp\fP\&. .SS "void zxdg_toplevel_decoration_v1_t::post_already_constructed (std::string const & msg)" .PP Post error: xdg_toplevel already has a decoration object\&. .PP Definition at line \fB7636\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_toplevel_decoration_v1_t::post_orphaned (std::string const & msg)" .PP Post error: xdg_toplevel destroyed before the decoration object\&. .PP Definition at line \fB7641\fP of file \fBwayland\-server\-protocol\-unstable\&.cpp\fP\&. .SS "void zxdg_toplevel_decoration_v1_t::post_unconfigured_buffer (std::string const & msg)" .PP Post error: xdg_toplevel has a buffer attached before configure\&. .PP Definition at line \fB7631\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_toplevel_decoration_v1_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 \fB7898\fP of file \fBwayland\-server\-protocol\-unstable\&.hpp\fP\&. .SH "Author" .PP Generated automatically by Doxygen for Wayland++ from the source code\&.