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 aproxy_thow 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 aproxy_tfrom awl_proxypointer.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 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.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.
π 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 awl_proxytβ type and requested behavior of the pointerqueueβ initial event queue reference to retain (set_queueis not called)
wayland::proxy_t::proxy_t (const proxy_t & p)
Copy constructor.
pβ Aproxy_tobject
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β Aproxy_tobject
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 line303of filewayland-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β aproxy_tobject
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β aproxy_tobject
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
- 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