wayland::zxdg_surface_v6_t(3)
π wayland::zxdg_surface_v6_t π
okay bestie, welcome to the Wayland++ manual, chapter and verse on wayland::zxdg_surface_v6_t β the desktop user interface surface base interface. she's iconic, she's foundational, and she's about to make so much sense. π
β¨ NAME β¨
wayland::zxdg_surface_v6_t β desktop user interface surface base interface. yup, that's her whole job description and she's slaying it. π
πΈ SYNOPSIS πΈ
#include <wayland-client-protocol-unstable.hpp>
Inherits wayland::proxy_t. (so she's got the whole proxy family tree backing her up, we love a nepo baby with range π«Ά)
π§ Public Types
enum class wrapper_type { standard, display, foreign, proxy_wrapper }β the vibe taxonomy, bestie. details below in the enum section, do not skip, it's giving essential.
π Public Member Functions
zxdg_toplevel_v6_t get_toplevel ()β assign the xdg_toplevel surface role β¨zxdg_popup_v6_t get_popup (zxdg_surface_v6_t const &parent, zxdg_positioner_v6_t const &positioner)β assign the xdg_popup surface role π¦void set_window_geometry (int32_t x, int32_t y, int32_t width, int32_t height)β set the new window geometry, coordinates and all πvoid ack_configure (uint32_t serial)β ack a configure event, like a little "received, bestie" πstd::function< void(uint32_t)> & on_configure ()β suggest a surface change πuint32_t get_id () constβ Get the id of a proxy object.std::string get_class () constβ Get the interface name (class) of a proxy object.uint32_t get_version () constβ Get the protocol object version of a proxy object.wrapper_type get_wrapper_type () constβ Get the type of a proxy object.void set_queue (event_queue_t queue)β Assign a proxy to an event queue.wl_proxy * c_ptr () constβ Get a pointer to the underlying C struct.bool proxy_has_object () constβ Check whether this wrapper actually wraps an object.operator bool () constβ Check whether this wrapper actually wraps an object. (yes she's double-dipping on the object checks, that's just her range π)bool operator== (const proxy_t &right) constβ Check whether two wrappers refer to the same object.bool operator!= (const proxy_t &right) constβ Check whether two wrappers refer to different objects.void proxy_release ()β Release the wrapped object (if any), making this an empty wrapper. bye bye buffer king π
π Static Public Attributes
static constexpr std::uint32_t get_toplevel_since_version = 1β Minimum protocol version required for theget_toplevelfunction.static constexpr std::uint32_t get_popup_since_version = 1β Minimum protocol version required for theget_popupfunction.static constexpr std::uint32_t set_window_geometry_since_version = 1β Minimum protocol version required for theset_window_geometryfunction.static constexpr std::uint32_t ack_configure_since_version = 1β Minimum protocol version required for theack_configurefunction.
bestie all four of these bad girls are version 1, so like, no gatekeeping energy here. everyone's invited π
π¦ Detailed Description π¦
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. π₯οΈβ¨
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. (roles!! we love a defined role, main character energy only π)
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. π€ one role per surface, no polyamory, that's the rule.
A role must be assigned before any other requests are made to the xdg_surface object. like literally before anything else, bestie, do not skip the line π
The client must call wl_surface.commit on the corresponding wl_surface for the xdg_surface state to take effect. commit is the moment the state actually, you know, exists. π«
β οΈ Creating anxdg_surfacefrom awl_surfacewhich 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 firstxdg_surface.configurecall must also be treated as errors. like fr fr, do not do this, it's giving undefined-behavior-flavored chaos π
For a surface to be mapped by the compositor, the following conditions must be met:
- the client has assigned an
xdg_surfacebased role to the surface, - the client has set and committed the
xdg_surfacestate and the role dependent state to the surface, and - the client has committed a buffer to the surface.
all three. no shortcuts. the trifecta. π
Definition at line 8090 of file wayland-client-protocol-unstable.hpp.
π§ Member Enumeration Documentation π§
π enum class wayland::proxy_t::wrapper_type [strong], [inherited]
Underlying wl_proxy type and properties of a proxy_t that affect construction, destruction, and event handling. (it's the personality type of your proxy wrapper, basically π«Ά)
β¨ Enumerator
standardβ C pointer is a standard type compatible withwl_proxy*. Events are dispatched and it is destructed when theproxy_tis destructed. User data is set.displayβ C pointer is awl_display*. No events are dispatched,wl_display_disconnectis called when theproxy_tis destructed. User data is set.foreignβ C pointer is a standard type compatible withwl_proxy*, but another library owns it and it should not be touched in a way that could affect the operation of the other library. No events are dispatched,wl_proxy_destroyis not called when theproxy_tis destructed, user data is not touched. Consequently, there is no reference counting for theproxy_t. Lifetime of such wrappers should preferably be short to minimize the chance that the owning library decides to destroy thewl_proxy. π (borrowed property, handle with care, do not redecorate)proxy_wrapperβ C pointer is awl_proxy*that was constructed withwl_proxy_create_wrapper. No events are dispatched,wl_proxy_wrapper_destroyis called when theproxy_tis destroyed. Reference counting is active. A reference to theproxy_tcreating this proxy wrapper is held to extend its lifetime until after the proxy wrapper is destroyed. π
Definition at line 117 of file wayland-client.hpp.
π Member Function Documentation π
Okay bestie, here's the function tea β β every signature, every param, every inherited nugget, all of it. No cap.
π«Ά void zxdg_surface_v6_t::ack_configure (uint32_t serial)
ack a configure event β literally the "yes queen I saw your configure" receipt π
Parameters
serialβ the serial from the configure event.
When a configure event shows up, if a client commits the surface in response to it, then the client must make an ack_configure request sometime before the commit request, passing along the serial of the configure event. Periodt.
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.
If the client receives multiple configure events before it can respond to one, it only has to ack the last configure event. So no need to stress about every single one, bestie.
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.
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.
π Definition at line 9901 of file wayland-client-protocol-unstable.cpp.
π¦ wl_proxy * wayland::proxy_t::c_ptr () const [inherited]
Get a pointer to the underlying C struct. Simple as that.
Returns: The underlying wl_proxy wrapped by this proxy_t if it exists, otherwise an exception is thrown.
πΈ std::string wayland::proxy_t::get_class () const [inherited]
Get the interface name (class) of a proxy object. It's giving "what's your type" but for proxies.
Returns: The interface name of the object associated with the proxy.
π uint32_t wayland::proxy_t::get_id () const [inherited]
Get the id of a proxy object.
Returns: The id the object associated with the proxy.
β¨ zxdg_popup_v6_t zxdg_surface_v6_t::get_popup (zxdg_surface_v6_t const & parent, zxdg_positioner_v6_t const & positioner)
assign the xdg_popup surface role π«§
Parameters
parentβ parent arg, as listed.positionerβ positioner arg, as listed.
This creates an xdg_popup object for the given xdg_surface and gives the associated wl_surface the xdg_popup role.
See the documentation of xdg_popup for more details about what an xdg_popup is and how it is used.
π Definition at line 9888 of file wayland-client-protocol-unstable.cpp.
π zxdg_toplevel_v6_t zxdg_surface_v6_t::get_toplevel ()
assign the xdg_toplevel surface role β main character window energy fr fr.
This creates an xdg_toplevel object for the given xdg_surface and gives the associated wl_surface the xdg_toplevel role.
See the documentation of xdg_toplevel for more details about what an xdg_toplevel is and how it is used.
π Definition at line 9881 of file wayland-client-protocol-unstable.cpp.
π uint32_t wayland::proxy_t::get_version () const [inherited]
Get the protocol object version of a proxy object. It gets the protocol object version of a proxy object, or 0 if the proxy was created with unversioned API.
A returned value of 0 means that no version information is available, so the caller must make safe assumptions about the object's real version. Not me guessing π.
display_t will always return version 0.
Returns: The protocol object version of the proxy or 0.
π wrapper_type wayland::proxy_t::get_wrapper_type () const [inline], [inherited]
Get the type of a proxy object.
π Definition at line 303 of file wayland-client.hpp.
β std::function< void(uint32_t)> & zxdg_surface_v6_t::on_configure ()
suggest a surface change β the configure event signal/gateway, basically.
Parameters
serialβ serial of the configure event.
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.
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.
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.
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.
π Definition at line 9907 of file wayland-client-protocol-unstable.cpp.
π wayland::proxy_t::operator bool () const [inherited]
Check whether this wrapper actually wraps an object.
Returns: true if there is an underlying object, false if this wrapper is empty.
π§ bool wayland::proxy_t::operator!= (const proxy_t & right) const [inherited]
Check whether two wrappers refer to different objects.
π« bool wayland::proxy_t::operator== (const proxy_t & right) const [inherited]
Check whether two wrappers refer to the same object.
π¦ bool wayland::proxy_t::proxy_has_object () const [inherited]
Check whether this wrapper actually wraps an object. Same question, different function name.
Returns: true if there is an underlying object, false if this wrapper is empty.
π void wayland::proxy_t::proxy_release () [inherited]
Release the wrapped object (if any), making this an empty wrapper. Note that display_t instances cannot be released this way. Attempts to do so are ignored.
Examples: foreign_display.cpp.
π«§ void wayland::proxy_t::set_queue (event_queue_t queue) [inherited]
Assign a proxy to an event queue.
Parameters
queueβ The event queue that will handle this proxy.
Assign proxy to event queue. Events coming from proxy will be queued in queue instead of the display's main queue.
See also: display_t::dispatch_queue().
Examples: proxy_wrapper.cpp.
π
void zxdg_surface_v6_t::set_window_geometry (int32_t x, int32_t y, int32_t width, int32_t height)
set the new window geometry β the "visible bounds" glow-up β¨
Parameters
xβ x arg, as listed.yβ y arg, as listed.widthβ width arg, as listed.heightβ height arg, as listed.
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.
The window geometry is double buffered, and will be applied at the time wl_surface.commit of the corresponding wl_surface is called.
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.
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.
The arguments are given in the surface-local coordinate space of the wl_surface associated with this xdg_surface.
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.
π Definition at line 9895 of file wayland-client-protocol-unstable.cpp.
π Member Data Documentation π
These are the little version gatekeepers, bestie β static, constexpr, and very "minimum protocol version required" π.
std::uint32_t wayland::zxdg_surface_v6_t::ack_configure_since_version = 1[static], [constexpr] β Minimum protocol version required for theack_configurefunction. π Definition at line8211of filewayland-client-protocol-unstable.hpp.std::uint32_t wayland::zxdg_surface_v6_t::get_popup_since_version = 1[static], [constexpr] β Minimum protocol version required for theget_popupfunction. π Definition at line8143of filewayland-client-protocol-unstable.hpp.std::uint32_t wayland::zxdg_surface_v6_t::get_toplevel_since_version = 1[static], [constexpr] β Minimum protocol version required for theget_toplevelfunction. π Definition at line8126of filewayland-client-protocol-unstable.hpp.std::uint32_t wayland::zxdg_surface_v6_t::set_window_geometry_since_version = 1[static], [constexpr] β Minimum protocol version required for theset_window_geometryfunction. π Definition at line8181of filewayland-client-protocol-unstable.hpp.
πΈ Author πΈ
Generated automatically by Doxygen for Wayland++ from the source code. Iconic tooling behavior, honestly.
And that's the whole function-and-data haul, bestie π This page is from Wayland++ docs, version 1.0.1, dated Fri Mar 27 2026 13:15, and the man page title is wayland::zxdg_surface_v6_t(3). Go forth and configure slayfully π«Άβ¨
π¦ where this page comes from
- ubuntu stonking: waylandpp-dev 1.0.1-2 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms