.TH "wayland::server::zxdg_toplevel_v6_t" 3 "Wed May 3 2023" "Version 1.0.0" "Wayland++" \" -*- nroff -*- .ad l .nh .SH NAME wayland::server::zxdg_toplevel_v6_t \- 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 xdg_toplevel " .ti -1c .RI "std::function< void(\fBzxdg_toplevel_v6_t\fP)> & \fBon_set_parent\fP ()" .br .RI "set the parent of this surface " .ti -1c .RI "std::function< void(std::string)> & \fBon_set_title\fP ()" .br .RI "set surface title " .ti -1c .RI "std::function< void(std::string)> & \fBon_set_app_id\fP ()" .br .RI "set application ID " .ti -1c .RI "std::function< void(\fBseat_t\fP, uint32_t, int32_t, int32_t)> & \fBon_show_window_menu\fP ()" .br .RI "show the window menu " .ti -1c .RI "std::function< void(\fBseat_t\fP, uint32_t)> & \fBon_move\fP ()" .br .RI "start an interactive move " .ti -1c .RI "std::function< void(\fBseat_t\fP, uint32_t, \fBzxdg_toplevel_v6_resize_edge\fP)> & \fBon_resize\fP ()" .br .RI "start an interactive resize " .ti -1c .RI "std::function< void(int32_t, int32_t)> & \fBon_set_max_size\fP ()" .br .RI "set the maximum size " .ti -1c .RI "std::function< void(int32_t, int32_t)> & \fBon_set_min_size\fP ()" .br .RI "set the minimum size " .ti -1c .RI "std::function< void()> & \fBon_set_maximized\fP ()" .br .RI "maximize the window " .ti -1c .RI "std::function< void()> & \fBon_unset_maximized\fP ()" .br .RI "unmaximize the window " .ti -1c .RI "std::function< void(\fBoutput_t\fP)> & \fBon_set_fullscreen\fP ()" .br .RI "set the window as fullscreen on a monitor " .ti -1c .RI "std::function< void()> & \fBon_set_minimized\fP ()" .br .RI "set the window as minimized " .ti -1c .RI "void \fBconfigure\fP (int32_t width, int32_t height, array_t const &states, bool post=true)" .br .RI "suggest a surface change " .ti -1c .RI "void \fBclose\fP (bool post=true)" .br .RI "surface wants to be closed " .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\&. " .ti -1c .RI "static constexpr std::uint32_t \fBclose_since_version\fP = 1" .br .RI "Minimum protocol version required for the \fBclose\fP function\&. " .in -1c .SH "Detailed Description" .PP toplevel surface This interface defines an xdg_surface role which allows a surface to, among other things, set window-like properties such as maximize, fullscreen, and minimize, set application-specific metadata like title and id, and well as trigger user interactive operations such as interactive resize and move\&. .PP Definition at line \fB9383\fP of file \fBwayland\-server\-protocol\-unstable\&.hpp\fP\&. .SH "Member Function Documentation" .PP .SS "void zxdg_toplevel_v6_t::close (bool post = \fCtrue\fP)" .PP surface wants to be closed The close event is sent by the compositor when the user wants the surface to be closed\&. This should be equivalent to the user clicking the close button in client-side decorations, if your application has any\&. .PP This is only a request that the user intends to close the window\&. The client may choose to ignore this request, or show a dialog to ask the user to save their data, etc\&. .PP Definition at line \fB8585\fP of file \fBwayland\-server\-protocol\-unstable\&.cpp\fP\&. .SS "void zxdg_toplevel_v6_t::configure (int32_t width, int32_t height, array_t const & states, bool post = \fCtrue\fP)" .PP suggest a surface change .PP \fBParameters\fP .RS 4 \fIwidth\fP .br \fIheight\fP .br \fIstates\fP .RE .PP This configure event asks the client to resize its toplevel surface or to change its state\&. The configured state should not be applied immediately\&. See xdg_surface\&.configure for details\&. .PP The width and height arguments specify a hint to the window about how its surface should be resized in window geometry coordinates\&. See set_window_geometry\&. .PP If the width or height arguments are zero, it means the client should decide its own window dimension\&. This may happen when the compositor needs to configure the state of the surface but doesn't have any information about any previous or expected dimension\&. .PP The states listed in the event specify how the width/height arguments should be interpreted, and possibly how it should be drawn\&. .PP Clients must send an ack_configure in response to this event\&. See xdg_surface\&.configure and xdg_surface\&.ack_configure for details\&. .PP Definition at line \fB8580\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_v6_t::on_destroy ()" .PP destroy the xdg_toplevel Unmap and destroy the window\&. The window will be effectively hidden from the user's point of view, and all state like maximization, fullscreen, and so on, will be lost\&. .PP Definition at line \fB8496\fP of file \fBwayland\-server\-protocol\-unstable\&.cpp\fP\&. .SS "std::function< void(\fBseat_t\fP, uint32_t)> & zxdg_toplevel_v6_t::on_move ()" .PP start an interactive move .PP \fBParameters\fP .RS 4 \fIseat\fP the wl_seat of the user event .br \fIserial\fP the serial of the user event .RE .PP Start an interactive, user-driven move of the surface\&. .PP This request must be used in response to some sort of user action like a button press, key press, or touch down event\&. The passed serial is used to determine the type of interactive move (touch, pointer, etc)\&. .PP The server may ignore move requests depending on the state of the surface (e\&.g\&. fullscreen or maximized), or if the passed serial is no longer valid\&. .PP If triggered, the surface will lose the focus of the device (wl_pointer, wl_touch, etc) used for the move\&. It is up to the compositor to visually indicate that the move is taking place, such as updating a pointer cursor, during the move\&. There is no guarantee that the device focus will return when the move is completed\&. .PP Definition at line \fB8526\fP of file \fBwayland\-server\-protocol\-unstable\&.cpp\fP\&. .SS "std::function< void(\fBseat_t\fP, uint32_t, \fBzxdg_toplevel_v6_resize_edge\fP)> & zxdg_toplevel_v6_t::on_resize ()" .PP start an interactive resize .PP \fBParameters\fP .RS 4 \fIseat\fP the wl_seat of the user event .br \fIserial\fP the serial of the user event .br \fIedges\fP which edge or corner is being dragged .RE .PP Start a user-driven, interactive resize of the surface\&. .PP This request must be used in response to some sort of user action like a button press, key press, or touch down event\&. The passed serial is used to determine the type of interactive resize (touch, pointer, etc)\&. .PP The server may ignore resize requests depending on the state of the surface (e\&.g\&. fullscreen or maximized)\&. .PP If triggered, the client will receive configure events with the 'resize' state enum value and the expected sizes\&. See the 'resize' enum value for more details about what is required\&. The client must also acknowledge configure events using 'ack_configure'\&. After the resize is completed, the client will receive another 'configure' event without the resize state\&. .PP If triggered, the surface also will lose the focus of the device (wl_pointer, wl_touch, etc) used for the resize\&. It is up to the compositor to visually indicate that the resize is taking place, such as updating a pointer cursor, during the resize\&. There is no guarantee that the device focus will return when the resize is completed\&. .PP The edges parameter specifies how the surface should be resized, and is one of the values of the resize_edge enum\&. The compositor may use this information to update the surface position for example when dragging the top left corner\&. The compositor may also use this information to adapt its behavior, e\&.g\&. choose an appropriate cursor image\&. .PP Definition at line \fB8532\fP of file \fBwayland\-server\-protocol\-unstable\&.cpp\fP\&. .SS "std::function< void(std::string)> & zxdg_toplevel_v6_t::on_set_app_id ()" .PP set application ID .PP \fBParameters\fP .RS 4 \fIapp_id\fP .RE .PP Set an application identifier for the surface\&. .PP The app ID identifies the general class of applications to which the surface belongs\&. The compositor can use this to group multiple surfaces together, or to determine how to launch a new application\&. .PP For D-Bus activatable applications, the app ID is used as the D-Bus service name\&. .PP The compositor shell will try to group application surfaces together by their app ID\&. As a best practice, it is suggested to select app ID's that match the basename of the application's \&.desktop file\&. For example, 'org\&.freedesktop\&.FooViewer' where the \&.desktop file is 'org\&.freedesktop\&.FooViewer\&.desktop'\&. .PP See the desktop-entry specification [0] for more details on application identifiers and how they relate to well-known D-Bus names and \&.desktop files\&. .PP [0] http://standards.freedesktop.org/desktop-entry-spec/ .PP Definition at line \fB8514\fP of file \fBwayland\-server\-protocol\-unstable\&.cpp\fP\&. .SS "std::function< void(\fBoutput_t\fP)> & zxdg_toplevel_v6_t::on_set_fullscreen ()" .PP set the window as fullscreen on a monitor .PP \fBParameters\fP .RS 4 \fIoutput\fP .RE .PP Make the surface fullscreen\&. .PP You can specify an output that you would prefer to be fullscreen\&. If this value is NULL, it's up to the compositor to choose which display will be used to map this surface\&. .PP If the surface doesn't cover the whole output, the compositor will position the surface in the center of the output and compensate with black borders filling the rest of the output\&. .PP Definition at line \fB8562\fP of file \fBwayland\-server\-protocol\-unstable\&.cpp\fP\&. .SS "std::function< void(int32_t, int32_t)> & zxdg_toplevel_v6_t::on_set_max_size ()" .PP set the maximum size .PP \fBParameters\fP .RS 4 \fIwidth\fP .br \fIheight\fP .RE .PP Set a maximum size for the window\&. .PP The client can specify a maximum size so that the compositor does not try to configure the window beyond this size\&. .PP The width and height arguments are in window geometry coordinates\&. See xdg_surface\&.set_window_geometry\&. .PP Values set in this way are double-buffered\&. They will get applied on the next commit\&. .PP The compositor can use this information to allow or disallow different states like maximize or fullscreen and draw accurate animations\&. .PP Similarly, a tiling window manager may use this information to place and resize client windows in a more effective way\&. .PP The client should not rely on the compositor to obey the maximum size\&. The compositor may decide to ignore the values set by the client and request a larger size\&. .PP If never set, or a value of zero in the request, means that the client has no expected maximum size in the given dimension\&. As a result, a client wishing to reset the maximum size to an unspecified state can use zero for width and height in the request\&. .PP Requesting a maximum size to be smaller than the minimum size of a surface is illegal and will result in a protocol error\&. .PP The width and height must be greater than or equal to zero\&. Using strictly negative values for width and height will result in a protocol error\&. .PP Definition at line \fB8538\fP of file \fBwayland\-server\-protocol\-unstable\&.cpp\fP\&. .SS "std::function< void()> & zxdg_toplevel_v6_t::on_set_maximized ()" .PP maximize the window Maximize the surface\&. .PP After requesting that the surface should be maximized, the compositor will respond by emitting a configure event with the 'maximized' state and the required window geometry\&. The client should then update its content, drawing it in a maximized state, i\&.e\&. without shadow or other decoration outside of the window geometry\&. The client must also acknowledge the configure when committing the new content (see ack_configure)\&. .PP It is up to the compositor to decide how and where to maximize the surface, for example which output and what region of the screen should be used\&. .PP If the surface was already maximized, the compositor will still emit a configure event with the 'maximized' state\&. .PP Definition at line \fB8550\fP of file \fBwayland\-server\-protocol\-unstable\&.cpp\fP\&. .SS "std::function< void(int32_t, int32_t)> & zxdg_toplevel_v6_t::on_set_min_size ()" .PP set the minimum size .PP \fBParameters\fP .RS 4 \fIwidth\fP .br \fIheight\fP .RE .PP Set a minimum size for the window\&. .PP The client can specify a minimum size so that the compositor does not try to configure the window below this size\&. .PP The width and height arguments are in window geometry coordinates\&. See xdg_surface\&.set_window_geometry\&. .PP Values set in this way are double-buffered\&. They will get applied on the next commit\&. .PP The compositor can use this information to allow or disallow different states like maximize or fullscreen and draw accurate animations\&. .PP Similarly, a tiling window manager may use this information to place and resize client windows in a more effective way\&. .PP The client should not rely on the compositor to obey the minimum size\&. The compositor may decide to ignore the values set by the client and request a smaller size\&. .PP If never set, or a value of zero in the request, means that the client has no expected minimum size in the given dimension\&. As a result, a client wishing to reset the minimum size to an unspecified state can use zero for width and height in the request\&. .PP Requesting a minimum size to be larger than the maximum size of a surface is illegal and will result in a protocol error\&. .PP The width and height must be greater than or equal to zero\&. Using strictly negative values for width and height will result in a protocol error\&. .PP Definition at line \fB8544\fP of file \fBwayland\-server\-protocol\-unstable\&.cpp\fP\&. .SS "std::function< void()> & zxdg_toplevel_v6_t::on_set_minimized ()" .PP set the window as minimized Request that the compositor minimize your surface\&. There is no way to know if the surface is currently minimized, nor is there any way to unset minimization on this surface\&. .PP If you are looking to throttle redrawing when minimized, please instead use the wl_surface\&.frame event for this, as this will also work with live previews on windows in Alt-Tab, Expose or similar compositor features\&. .PP Definition at line \fB8574\fP of file \fBwayland\-server\-protocol\-unstable\&.cpp\fP\&. .SS "std::function< void(\fBzxdg_toplevel_v6_t\fP)> & zxdg_toplevel_v6_t::on_set_parent ()" .PP set the parent of this surface .PP \fBParameters\fP .RS 4 \fIparent\fP .RE .PP Set the 'parent' of this surface\&. This window should be stacked above a parent\&. The parent surface must be mapped as long as this surface is mapped\&. .PP Parent windows should be set on dialogs, toolboxes, or other 'auxiliary' surfaces, so that the parent is raised when the dialog is raised\&. .PP Definition at line \fB8502\fP of file \fBwayland\-server\-protocol\-unstable\&.cpp\fP\&. .SS "std::function< void(std::string)> & zxdg_toplevel_v6_t::on_set_title ()" .PP set surface title .PP \fBParameters\fP .RS 4 \fItitle\fP .RE .PP Set a short title for the surface\&. .PP This string may be used to identify the surface in a task bar, window list, or other user interface elements provided by the compositor\&. .PP The string must be encoded in UTF-8\&. .PP Definition at line \fB8508\fP of file \fBwayland\-server\-protocol\-unstable\&.cpp\fP\&. .SS "std::function< void(\fBseat_t\fP, uint32_t, int32_t, int32_t)> & zxdg_toplevel_v6_t::on_show_window_menu ()" .PP show the window menu .PP \fBParameters\fP .RS 4 \fIseat\fP the wl_seat of the user event .br \fIserial\fP the serial of the user event .br \fIx\fP the x position to pop up the window menu at .br \fIy\fP the y position to pop up the window menu at .RE .PP Clients implementing client-side decorations might want to show a context menu when right-clicking on the decorations, giving the user a menu that they can use to maximize or minimize the window\&. .PP This request asks the compositor to pop up such a window menu at the given position, relative to the local surface coordinates of the parent surface\&. There are no guarantees as to what menu items the window menu contains\&. .PP This request must be used in response to some sort of user action like a button press, key press, or touch down event\&. .PP Definition at line \fB8520\fP of file \fBwayland\-server\-protocol\-unstable\&.cpp\fP\&. .SS "std::function< void()> & zxdg_toplevel_v6_t::on_unset_maximized ()" .PP unmaximize the window Unmaximize the surface\&. .PP After requesting that the surface should be unmaximized, the compositor will respond by emitting a configure event without the 'maximized' state\&. If available, the compositor will include the window geometry dimensions the window had prior to being maximized in the configure request\&. The client must then update its content, drawing it in a regular state, i\&.e\&. potentially with shadow, etc\&. The client must also acknowledge the configure when committing the new content (see ack_configure)\&. .PP It is up to the compositor to position the surface after it was unmaximized; usually the position the surface had before maximizing, if applicable\&. .PP If the surface was already not maximized, the compositor will still emit a configure event without the 'maximized' state\&. .PP Definition at line \fB8556\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 "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_v6_t::close_since_version = 1\fC [static]\fP, \fC [constexpr]\fP" .PP Minimum protocol version required for the \fBclose\fP function\&. .PP Definition at line \fB9782\fP of file \fBwayland\-server\-protocol\-unstable\&.hpp\fP\&. .SS "constexpr std::uint32_t wayland::server::zxdg_toplevel_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 \fB9764\fP of file \fBwayland\-server\-protocol\-unstable\&.hpp\fP\&. .SH "Author" .PP Generated automatically by Doxygen for Wayland++ from the source code\&.