.TH "wayland::proxy_t" 3 "Wed May 1 2024 17:27:19" "Version 1.0.0" "Wayland++" \" -*- nroff -*- .ad l .nh .SH NAME wayland::proxy_t \- Represents a protocol object on the client side\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherited by \fBwayland::buffer_t\fP, \fBwayland::callback_t\fP, \fBwayland::compositor_t\fP, \fBwayland::data_device_manager_t\fP, \fBwayland::data_device_t\fP, \fBwayland::data_offer_t\fP, \fBwayland::data_source_t\fP, \fBwayland::display_t\fP, \fBwayland::keyboard_t\fP, \fBwayland::output_t\fP, \fBwayland::pointer_t\fP, \fBwayland::presentation_feedback_t\fP, \fBwayland::presentation_t\fP, \fBwayland::region_t\fP, \fBwayland::registry_t\fP, \fBwayland::seat_t\fP, \fBwayland::shell_surface_t\fP, \fBwayland::shell_t\fP, \fBwayland::shm_pool_t\fP, \fBwayland::shm_t\fP, \fBwayland::subcompositor_t\fP, \fBwayland::subsurface_t\fP, \fBwayland::surface_t\fP, \fBwayland::touch_t\fP, \fBwayland::viewport_t\fP, \fBwayland::viewporter_t\fP, \fBwayland::xdg_activation_token_v1_t\fP, \fBwayland::xdg_activation_v1_t\fP, \fBwayland::xdg_popup_t\fP, \fBwayland::xdg_positioner_t\fP, \fBwayland::xdg_surface_t\fP, \fBwayland::xdg_toplevel_t\fP, \fBwayland::xdg_wm_base_t\fP, \fBwayland::zwp_confined_pointer_v1_t\fP, wayland::zwp_fullscreen_shell_mode_feedback_v1_t, \fBwayland::zwp_fullscreen_shell_v1_t\fP, \fBwayland::zwp_idle_inhibit_manager_v1_t\fP, \fBwayland::zwp_idle_inhibitor_v1_t\fP, \fBwayland::zwp_input_method_context_v1_t\fP, \fBwayland::zwp_input_method_v1_t\fP, wayland::zwp_input_panel_surface_v1_t, \fBwayland::zwp_input_panel_v1_t\fP, \fBwayland::zwp_input_timestamps_manager_v1_t\fP, \fBwayland::zwp_input_timestamps_v1_t\fP, \fBwayland::zwp_keyboard_shortcuts_inhibit_manager_v1_t\fP, \fBwayland::zwp_keyboard_shortcuts_inhibitor_v1_t\fP, \fBwayland::zwp_linux_buffer_params_v1_t\fP, \fBwayland::zwp_linux_buffer_release_v1_t\fP, \fBwayland::zwp_linux_dmabuf_feedback_v1_t\fP, \fBwayland::zwp_linux_dmabuf_v1_t\fP, \fBwayland::zwp_linux_explicit_synchronization_v1_t\fP, \fBwayland::zwp_linux_surface_synchronization_v1_t\fP, \fBwayland::zwp_locked_pointer_v1_t\fP, \fBwayland::zwp_pointer_constraints_v1_t\fP, \fBwayland::zwp_pointer_gesture_hold_v1_t\fP, \fBwayland::zwp_pointer_gesture_pinch_v1_t\fP, \fBwayland::zwp_pointer_gesture_swipe_v1_t\fP, \fBwayland::zwp_pointer_gestures_v1_t\fP, \fBwayland::zwp_primary_selection_device_manager_v1_t\fP, wayland::zwp_primary_selection_device_v1_t, \fBwayland::zwp_primary_selection_offer_v1_t\fP, \fBwayland::zwp_primary_selection_source_v1_t\fP, \fBwayland::zwp_relative_pointer_manager_v1_t\fP, \fBwayland::zwp_relative_pointer_v1_t\fP, \fBwayland::zwp_tablet_manager_v1_t\fP, \fBwayland::zwp_tablet_manager_v2_t\fP, \fBwayland::zwp_tablet_pad_group_v2_t\fP, \fBwayland::zwp_tablet_pad_ring_v2_t\fP, \fBwayland::zwp_tablet_pad_strip_v2_t\fP, \fBwayland::zwp_tablet_pad_v2_t\fP, \fBwayland::zwp_tablet_seat_v1_t\fP, \fBwayland::zwp_tablet_seat_v2_t\fP, \fBwayland::zwp_tablet_tool_v1_t\fP, \fBwayland::zwp_tablet_tool_v2_t\fP, \fBwayland::zwp_tablet_v1_t\fP, \fBwayland::zwp_tablet_v2_t\fP, \fBwayland::zwp_text_input_manager_v1_t\fP, \fBwayland::zwp_text_input_manager_v3_t\fP, \fBwayland::zwp_text_input_v1_t\fP, \fBwayland::zwp_text_input_v3_t\fP, \fBwayland::zwp_xwayland_keyboard_grab_manager_v1_t\fP, \fBwayland::zwp_xwayland_keyboard_grab_v1_t\fP, \fBwayland::zxdg_decoration_manager_v1_t\fP, \fBwayland::zxdg_exported_v1_t\fP, \fBwayland::zxdg_exported_v2_t\fP, \fBwayland::zxdg_exporter_v1_t\fP, \fBwayland::zxdg_exporter_v2_t\fP, \fBwayland::zxdg_imported_v1_t\fP, \fBwayland::zxdg_imported_v2_t\fP, \fBwayland::zxdg_importer_v1_t\fP, \fBwayland::zxdg_importer_v2_t\fP, \fBwayland::zxdg_output_manager_v1_t\fP, \fBwayland::zxdg_output_v1_t\fP, \fBwayland::zxdg_popup_v6_t\fP, \fBwayland::zxdg_positioner_v6_t\fP, \fBwayland::zxdg_shell_v6_t\fP, \fBwayland::zxdg_surface_v6_t\fP, \fBwayland::zxdg_toplevel_decoration_v1_t\fP, and \fBwayland::zxdg_toplevel_v6_t\fP\&. .SS "Public Types" .in +1c .ti -1c .RI "enum class \fBwrapper_type\fP { \fBstandard\fP, \fBdisplay\fP, \fBforeign\fP, \fBproxy_wrapper\fP }" .br .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBproxy_t\fP (wl_proxy *p, \fBwrapper_type\fP t=\fBwrapper_type::standard\fP, \fBevent_queue_t\fP const &queue=\fBevent_queue_t\fP())" .br .RI "Cronstruct a \fBproxy_t\fP from a wl_proxy pointer\&. " .ti -1c .RI "\fBproxy_t\fP (const \fBproxy_t\fP &p)" .br .RI "Copy Constructior\&. " .ti -1c .RI "\fBproxy_t\fP & \fBoperator=\fP (const \fBproxy_t\fP &p)" .br .RI "Assignment operator\&. " .ti -1c .RI "\fBproxy_t\fP (\fBproxy_t\fP &&p) noexcept" .br .RI "Move Constructior\&. " .ti -1c .RI "\fBproxy_t\fP & \fBoperator=\fP (\fBproxy_t\fP &&p) noexcept" .br .RI "Move Asignment operator\&. " .ti -1c .RI "\fB~proxy_t\fP ()" .br .RI "Destructor\&. " .ti -1c .RI "uint32_t \fBget_id\fP () const" .br .RI "Get the id of a proxy object\&. " .ti -1c .RI "std::string \fBget_class\fP () const" .br .RI "Get the interface name (class) of a proxy object\&. " .ti -1c .RI "uint32_t \fBget_version\fP () const" .br .RI "Get the protocol object version of a proxy object\&. " .ti -1c .RI "\fBwrapper_type\fP \fBget_wrapper_type\fP () const" .br .RI "Get the type of a proxy object\&. " .ti -1c .RI "void \fBset_queue\fP (\fBevent_queue_t\fP queue)" .br .RI "Assign a proxy to an event queue\&. " .ti -1c .RI "wl_proxy * \fBc_ptr\fP () const" .br .RI "Get a pointer to the underlying C struct\&. " .ti -1c .RI "bool \fBproxy_has_object\fP () const" .br .RI "Check whether this wrapper actually wraps an object\&. " .ti -1c .RI "\fBoperator bool\fP () const" .br .RI "Check whether this wrapper actually wraps an object\&. " .ti -1c .RI "bool \fBoperator==\fP (const \fBproxy_t\fP &right) const" .br .RI "Check whether two wrappers refer to the same object\&. " .ti -1c .RI "bool \fBoperator!=\fP (const \fBproxy_t\fP &right) const" .br .RI "Check whether two wrappers refer to different objects\&. " .ti -1c .RI "void \fBproxy_release\fP ()" .br .RI "Release the wrapped object (if any), making this an empty wrapper\&. " .in -1c .SH "Detailed Description" .PP Represents a protocol object on the client side\&. A \fBproxy_t\fP 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\&. .PP With the exception of the function \fBproxy_t::set_queue()\fP, functions accessing a \fBproxy_t\fP are not normally used by client code\&. Clients should normally use the higher level interface classed generated by the scanner to interact with compositor objects\&. .PP Definition at line \fB109\fP of file \fBwayland\-client\&.hpp\fP\&. .SH "Member Enumeration Documentation" .PP .SS "enum class \fBwayland::proxy_t::wrapper_type\fP\fC [strong]\fP" Underlying wl_proxy type and properties of a \fBproxy_t\fP that affect construction, destruction, and event handling .PP \fBEnumerator\fP .in +1c .TP \fB\fIstandard \fP\fP C pointer is a standard type compatible with wl_proxy*\&. Events are dispatched and it is destructed when the \fBproxy_t\fP is destructed\&. User data is set\&. .TP \fB\fIdisplay \fP\fP C pointer is a wl_display*\&. No events are dispatched, wl_display_disconnect is called when the \fBproxy_t\fP is destructed\&. User data is set\&. .TP \fB\fIforeign \fP\fP 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 \fBproxy_t\fP is destructed, user data is not touched\&. Consequently, there is no reference counting for the \fBproxy_t\fP\&. Lifetime of such wrappers should preferably be short to minimize the chance that the owning library decides to destroy the wl_proxy\&. .TP \fB\fIproxy_wrapper \fP\fP 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 \fBproxy_t\fP is destroyed\&. Reference counting is active\&. A reference to the \fBproxy_t\fP creating this proxy wrapper is held to extend its lifetime until after the proxy wrapper is destroyed\&. .PP Definition at line \fB116\fP of file \fBwayland\-client\&.hpp\fP\&. .SH "Constructor & Destructor Documentation" .PP .SS "wayland::proxy_t::proxy_t (wl_proxy * p, \fBwrapper_type\fP t = \fC\fBwrapper_type::standard\fP\fP, \fBevent_queue_t\fP const & queue = \fC\fBevent_queue_t\fP()\fP)" .PP Cronstruct a \fBproxy_t\fP from a wl_proxy pointer\&. .PP \fBParameters\fP .RS 4 \fIp\fP Pointer to a wl_proxy .br \fIt\fP type and requested behavior of the pointer .br \fIqueue\fP initial event queue reference to retain (set_queue is not called) .RE .PP .SS "wayland::proxy_t::proxy_t (const \fBproxy_t\fP & p)" .PP Copy Constructior\&. .PP \fBParameters\fP .RS 4 \fIp\fP A \fBproxy_t\fP object .RE .PP Creates a copy of the \fBproxy_t\fP object that points to the sme proxy\&. .SS "wayland::proxy_t::proxy_t (\fBproxy_t\fP && p)\fC [noexcept]\fP" .PP Move Constructior\&. .PP \fBParameters\fP .RS 4 \fIp\fP A \fBproxy_t\fP object .RE .PP Transfers the contents of the \fBproxy_t\fP object on the right to the \fBproxy_t\fP object being constructed\&. .SS "wayland::proxy_t::~proxy_t ()" .PP Destructor\&. If this is the last copy of a paticular proxy, the proxy itself will be detroyed and an 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 \fBwrapper_type\fP for more infos\&. .SH "Member Function Documentation" .PP .SS "wl_proxy * wayland::proxy_t::c_ptr () const" .PP Get a pointer to the underlying C struct\&. .PP \fBReturns\fP .RS 4 The underlying wl_proxy wrapped by this \fBproxy_t\fP if it exists, otherwise an exception is thrown .RE .PP .SS "std::string wayland::proxy_t::get_class () const" .PP Get the interface name (class) of a proxy object\&. .PP \fBReturns\fP .RS 4 The interface name of the object associated with the proxy .RE .PP .SS "uint32_t wayland::proxy_t::get_id () const" .PP Get the id of a proxy object\&. .PP \fBReturns\fP .RS 4 The id the object associated with the proxy .RE .PP .SS "uint32_t wayland::proxy_t::get_version () const" .PP Get the protocol object version of a proxy object\&. Gets the protocol object version of a proxy object, or 0 if the proxy was created with unversioned API\&. .PP 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\&. .PP \fBdisplay_t\fP will always return version 0\&. .PP \fBReturns\fP .RS 4 The protocol object version of the proxy or 0 .RE .PP .SS "\fBwrapper_type\fP wayland::proxy_t::get_wrapper_type () const\fC [inline]\fP" .PP Get the type of a proxy object\&. .PP Definition at line \fB302\fP of file \fBwayland\-client\&.hpp\fP\&. .SS "wayland::proxy_t::operator bool () const" .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 .SS "bool wayland::proxy_t::operator!= (const \fBproxy_t\fP & right) const" .PP Check whether two wrappers refer to different objects\&. .SS "\fBproxy_t\fP & wayland::proxy_t::operator= (const \fBproxy_t\fP & p)" .PP Assignment operator\&. .PP \fBParameters\fP .RS 4 \fIp\fP A \fBproxy_t\fP object .RE .PP After an assignment, both \fBproxy_t\fP objects will point to the same proxy\&. .SS "\fBproxy_t\fP & wayland::proxy_t::operator= (\fBproxy_t\fP && p)\fC [noexcept]\fP" .PP Move Asignment operator\&. .PP \fBParameters\fP .RS 4 \fIp\fP A \fBproxy_t\fP object .RE .PP Swaps the contents of both \fBproxy_t\fP objects\&. .SS "bool wayland::proxy_t::operator== (const \fBproxy_t\fP & right) const" .PP Check whether two wrappers refer to the same object\&. .SS "bool wayland::proxy_t::proxy_has_object () const" .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 .SS "void wayland::proxy_t::proxy_release ()" .PP Release the wrapped object (if any), making this an empty wrapper\&. Note that \fBdisplay_t\fP instances cannot be released this way\&. Attempts to do so are ignored\&. .PP \fBExamples\fP .in +1c \fBforeign_display\&.cpp\fP\&. .SS "void wayland::proxy_t::set_queue (\fBevent_queue_t\fP queue)" .PP Assign a proxy to an event queue\&. .PP \fBParameters\fP .RS 4 \fIqueue\fP The event queue that will handle this proxy .RE .PP Assign proxy to event queue\&. Events coming from proxy will be queued in queue instead of the display's main queue\&. .PP See also: \fBdisplay_t::dispatch_queue()\fP\&. .PP \fBExamples\fP .in +1c \fBproxy_wrapper\&.cpp\fP\&. .SH "Author" .PP Generated automatically by Doxygen for Wayland++ from the source code\&.