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 the get_toplevel function.
  • static constexpr std::uint32_t get_popup_since_version = 1 β€” Minimum protocol version required for the get_popup function.
  • static constexpr std::uint32_t set_window_geometry_since_version = 1 β€” Minimum protocol version required for the set_window_geometry function.
  • static constexpr std::uint32_t ack_configure_since_version = 1 β€” Minimum protocol version required for the ack_configure function.

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 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. 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:

  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.

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 with wl_proxy*. Events are dispatched and it is destructed when the proxy_t is destructed. User data is set.
  • display β€” C pointer is a wl_display*. No events are dispatched, wl_display_disconnect is called when the proxy_t is destructed. User data is set.
  • foreign β€” C pointer is a standard type compatible with wl_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_destroy is not called when the proxy_t is destructed, user data is not touched. Consequently, there is no reference counting for the proxy_t. Lifetime of such wrappers should preferably be short to minimize the chance that the owning library decides to destroy the wl_proxy. πŸ™ˆ (borrowed property, handle with care, do not redecorate)
  • proxy_wrapper β€” C pointer is a wl_proxy* that was constructed with wl_proxy_create_wrapper. No events are dispatched, wl_proxy_wrapper_destroy is called when the proxy_t is destroyed. Reference counting is active. A reference to the proxy_t creating 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 the ack_configure function. πŸ“ Definition at line 8211 of file wayland-client-protocol-unstable.hpp.
  • std::uint32_t wayland::zxdg_surface_v6_t::get_popup_since_version = 1 [static], [constexpr] β€” Minimum protocol version required for the get_popup function. πŸ“ Definition at line 8143 of file wayland-client-protocol-unstable.hpp.
  • std::uint32_t wayland::zxdg_surface_v6_t::get_toplevel_since_version = 1 [static], [constexpr] β€” Minimum protocol version required for the get_toplevel function. πŸ“ Definition at line 8126 of file wayland-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 the set_window_geometry function. πŸ“ Definition at line 8181 of file wayland-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