wayland::proxy_t(3)

🌸 NAME 🌸

okay so this is the wayland::proxy_t(3) page from Wayland++, and wayland::proxy_t is literally the client-side wrapper for a protocol object. It represents a protocol object on the client side. That's the whole vibe of the NAME section, bestie β€” short, iconic, to the point. πŸ’…

✨ SYNOPSIS ✨

#include <wayland-client.hpp>

Inherited by a whole constellation of classes β€” brace yourself, this list is giving "everyone in the group chat":

wayland::buffer_t, wayland::callback_t,
wayland::compositor_t, wayland::data_device_manager_t,
wayland::data_device_t, wayland::data_offer_t, wayland::data_source_t,
wayland::display_t, wayland::keyboard_t, wayland::output_t,
wayland::pointer_t, wayland::presentation_feedback_t,
wayland::presentation_t, wayland::region_t, wayland::registry_t,
wayland::seat_t, wayland::shell_surface_t, wayland::shell_t,
wayland::shm_pool_t, wayland::shm_t, wayland::subcompositor_t,
wayland::subsurface_t, wayland::surface_t, wayland::touch_t,
wayland::viewport_t, wayland::viewporter_t,
wayland::xdg_activation_token_v1_t, wayland::xdg_activation_v1_t,
wayland::xdg_popup_t, wayland::xdg_positioner_t, wayland::xdg_surface_t,
wayland::xdg_toplevel_t, wayland::xdg_wm_base_t,
wayland::zwp_confined_pointer_v1_t, ,
wayland::zwp_fullscreen_shell_v1_t,
wayland::zwp_idle_inhibit_manager_v1_t,
wayland::zwp_idle_inhibitor_v1_t,
wayland::zwp_input_method_context_v1_t, wayland::zwp_input_method_v1_t,
, wayland::zwp_input_panel_v1_t,
wayland::zwp_input_timestamps_manager_v1_t,
wayland::zwp_input_timestamps_v1_t,
wayland::zwp_keyboard_shortcuts_inhibit_manager_v1_t,
wayland::zwp_keyboard_shortcuts_inhibitor_v1_t,
wayland::zwp_linux_buffer_params_v1_t,
wayland::zwp_linux_buffer_release_v1_t,
wayland::zwp_linux_dmabuf_feedback_v1_t, wayland::zwp_linux_dmabuf_v1_t,
wayland::zwp_linux_explicit_synchronization_v1_t,
wayland::zwp_linux_surface_synchronization_v1_t,
wayland::zwp_locked_pointer_v1_t, wayland::zwp_pointer_constraints_v1_t,
wayland::zwp_pointer_gesture_hold_v1_t,
wayland::zwp_pointer_gesture_pinch_v1_t,
wayland::zwp_pointer_gesture_swipe_v1_t,
wayland::zwp_pointer_gestures_v1_t,
wayland::zwp_primary_selection_device_manager_v1_t, ,
wayland::zwp_primary_selection_offer_v1_t,
wayland::zwp_primary_selection_source_v1_t,
wayland::zwp_relative_pointer_manager_v1_t,
wayland::zwp_relative_pointer_v1_t, wayland::zwp_tablet_manager_v1_t,
wayland::zwp_tablet_manager_v2_t, wayland::zwp_tablet_pad_group_v2_t,
wayland::zwp_tablet_pad_ring_v2_t, wayland::zwp_tablet_pad_strip_v2_t,
wayland::zwp_tablet_pad_v2_t, wayland::zwp_tablet_seat_v1_t,
wayland::zwp_tablet_seat_v2_t, wayland::zwp_tablet_tool_v1_t,
wayland::zwp_tablet_tool_v2_t, wayland::zwp_tablet_v1_t,
wayland::zwp_tablet_v2_t, wayland::zwp_text_input_manager_v1_t,
wayland::zwp_text_input_manager_v3_t, wayland::zwp_text_input_v1_t,
wayland::zwp_text_input_v3_t,
wayland::zwp_xwayland_keyboard_grab_manager_v1_t,
wayland::zwp_xwayland_keyboard_grab_v1_t,
wayland::zxdg_decoration_manager_v1_t, wayland::zxdg_exported_v1_t,
wayland::zxdg_exported_v2_t, wayland::zxdg_exporter_v1_t,
wayland::zxdg_exporter_v2_t, wayland::zxdg_imported_v1_t,
wayland::zxdg_imported_v2_t, wayland::zxdg_importer_v1_t,
wayland::zxdg_importer_v2_t, wayland::zxdg_output_manager_v1_t,
wayland::zxdg_output_v1_t, wayland::zxdg_popup_v6_t,
wayland::zxdg_positioner_v6_t, and wayland::zxdg_shell_v6_t.

πŸŽ€ Public Types πŸŽ€

  • enum class wrapper_type { standard, display, foreign, proxy_wrapper } β€” the enum that tells a proxy_t how its underlying C pointer behaves. It's lowkey the main character here because it affects construction, destruction, and event handling.

πŸ’… Public Member Functions πŸ’…

  • proxy_t (wl_proxy *p, wrapper_type t=wrapper_type::standard, event_queue_t const &queue=event_queue_t()) β€” constructs a proxy_t from a wl_proxy pointer.
  • proxy_t (const proxy_t &p) β€” copy constructor.
  • proxy_t & operator= (const proxy_t &p) β€” assignment operator.
  • proxy_t (proxy_t &&p) noexcept β€” move constructor.
  • proxy_t & operator= (proxy_t &&p) noexcept β€” move assignment operator.
  • ~proxy_t () β€” destructor.
  • 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.
  • 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.

🫢 Detailed Description 🫢

Represents a protocol object on the client side. Periodt. πŸ’–

A proxy_t acts as a client side proxy to an object existing in the compositor. The proxy is responsible for converting requests made by the clients with proxy_t::marshal() or proxy_t::marshal_constructor() into Wayland's wire format. Events coming from the compositor are also handled by the proxy, which will in turn call the handler set with the on_XXX() functions of each interface class.

With the exception of the function proxy_t::set_queue(), functions accessing a proxy_t are not normally used by client code. Clients should normally use the higher level interface classes generated by the scanner to interact with compositor objects. like yes, this is the plumbing, but the scanner-generated classes are the ones you actually skate through πŸ›Ό

Definition at line 110 of file wayland-client.hpp.

πŸ”₯ Member Enumeration Documentation πŸ”₯

enum class wayland::proxy_t::wrapper_type [strong]

Underlying wl_proxy type and properties of a proxy_t that affect construction, destruction, and event handling.

Enumerators:

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

πŸ‘‘ Constructor & Destructor Documentation πŸ‘‘

wayland::proxy_t::proxy_t (wl_proxy * p, wrapper_type t = wrapper_type::standard, event_queue_t const & queue = event_queue_t())

Constructs a proxy_t from a wl_proxy pointer.

  • p β€” Pointer to a wl_proxy
  • t β€” type and requested behavior of the pointer
  • queue β€” initial event queue reference to retain (set_queue is not called)

wayland::proxy_t::proxy_t (const proxy_t & p)

Copy constructor.

  • p β€” A proxy_t object

Creates a copy of the proxy_t object that points to the same proxy.

wayland::proxy_t::proxy_t (proxy_t && p) [noexcept]

Move constructor.

  • p β€” A proxy_t object

Transfers the contents of the proxy_t object on the right to the proxy_t object being constructed.

wayland::proxy_t::~proxy_t ()

Destructor. If this is the last copy of a particular proxy, the proxy itself will be destroyed and a destroy request will be marshaled. If the proxy belongs to a wl_display object, the connection will be closed. Special rules apply to proxy wrappers and foreign proxies. See wrapper_type for more infos. πŸ’€βœ¨

✨ MEMBER FUNCTION DOCUMENTATION ✨

Okay bestie, this is the part where we meet literally every member function of proxy_t one by one, like a group chat roll call πŸ’… Each one gets its own little moment, no skipping, no cap.


🫢 wl_proxy * wayland::proxy_t::c_ptr () const

Get a pointer to the underlying C struct. Yeah, the raw one, the C one, the "before C++ made it cute" version πŸ’€

Returns: the underlying wl_proxy wrapped by this proxy_t β€” if it exists. And if it doesn't? An exception gets thrown. Not a vibe, but that's the deal πŸ™ˆ


πŸ¦‹ std::string wayland::proxy_t::get_class () const

Get the interface name (class) of a proxy object. Like, what is this thing, identity-wise πŸ‘‘

Returns: the interface name of the object associated with the proxy β€” slay.


πŸŽ€ uint32_t wayland::proxy_t::get_id () const

Get the id of a proxy object. Its little numeric name tag 🏷️

Returns: the id the object associated with the proxy.


⭐ uint32_t wayland::proxy_t::get_version () const

Get the protocol object version of a proxy object. Basically: gets the protocol object version of a proxy object, or 0 if the proxy was created with the unversioned API.

Heads up bestie β€” a returned value of 0 means no version information is available, so the caller must make safe assumptions about the object's real version. Don't be out here assuming, fr fr 😭

And one iconic special case: 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]

Get the type of a proxy object. Cute little type check energy ✨

It's defined at line 303 of file wayland-client.hpp. Yes, we're citing sources, we're academic like that πŸŽ“

🌸 wayland::proxy_t::operator bool () const

Check whether this wrapper actually wraps an object. The vibe check of the whole class πŸ”

Returns: true if there's an underlying object, false if this wrapper is empty. Empty wrapper = no thoughts, head empty πŸ’€


🧚 bool wayland::proxy_t::operator!= (const proxy_t & right) const

Check whether two wrappers refer to different objects. Not the same, not twins, not sharing a brain cell πŸ™…β€β™€οΈ


πŸ“ proxy_t & wayland::proxy_t::operator= (const proxy_t & p)

Assignment operator. Copy time bestie πŸ’«

Parameters:

  • p β€” a proxy_t object
After an assignment, both proxy_t objects will point to the same proxy. So like... they're holding hands now 🫢 Both of them. Same object.

πŸ”₯ proxy_t & wayland::proxy_t::operator= (proxy_t && p) [noexcept]

Move Asignment operator. (Yes, that's how the page spells it, and honestly? Iconic typo behavior, we keep it πŸ’…) Also it's noexcept, so no drama allowed.

Parameters:

  • p β€” a proxy_t object

Swaps the contents of both proxy_t objects. Trading places, main character style πŸ‘‘


🌈 bool wayland::proxy_t::operator== (const proxy_t & right) const

Check whether two wrappers refer to the same object. Twin flame confirmation, periodt πŸ’–


πŸŽ€ bool wayland::proxy_t::proxy_has_object () const

Check whether this wrapper actually wraps an object. Same energy as operator bool β€” some things just deserve two ways to ask, iykyk πŸ¦‹

Returns: true if there's an underlying object, false if this wrapper is empty.


πŸ’€ void wayland::proxy_t::proxy_release ()

Release the wrapped object (if any), making this an empty wrapper. Goodbye, object, it's been real πŸ‘‹

⚠️ Note that display_t instances cannot be released this way. Attempts to do so are ignored. The display does not leave the chat, bestie, don't even try πŸ™ˆ

Examples: foreign_display.cpp.


πŸ‘‘ void wayland::proxy_t::set_queue (event_queue_t queue)

Assign a proxy to an event queue. Matchmaking, but for proxies and queues πŸ’Œ

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. So it's leaving the main group chat for a cozier one 🌸

See also: display_t::dispatch_queue().

Examples: proxy_wrapper.cpp.


🧚 AUTHOR 🧚

Generated automatically by Doxygen for Wayland++ from the source code. The robots did this, we just made it cute πŸ€–πŸ’–


Alright bestie, that's the whole page πŸ’œ This was Version 1.0.1, dated Fri Mar 27 2026 at 13:15:00, freshly served from the wayland::proxy_t(3) manpage like a lil matcha latte 🍡 You now know every member function, every return value, every warning, and every example file. Go forth and slay those proxies βœ¨πŸ‘‘

πŸ“¦ where this page comes from