.TH "wayland::zxdg_output_v1_t" 3 "Wed May 1 2024 17:27:19" "Version 1.0.0" "Wayland++" \" -*- nroff -*- .ad l .nh .SH NAME wayland::zxdg_output_v1_t \- compositor logical output region .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBwayland::proxy_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 "std::function< void(int32_t, int32_t)> & \fBon_logical_position\fP ()" .br .RI "position of the output within the global compositor space " .ti -1c .RI "std::function< void(int32_t, int32_t)> & \fBon_logical_size\fP ()" .br .RI "size of the output in the global compositor space " .ti -1c .RI "std::function< void()> & \fBon_done\fP ()" .br .RI "all information about the output have been sent " .ti -1c .RI "std::function< void(std::string)> & \fBon_name\fP ()" .br .RI "name of this output " .ti -1c .RI "std::function< void(std::string)> & \fBon_description\fP ()" .br .RI "human-readable description of this output " .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 compositor logical output region An xdg_output describes part of the compositor geometry\&. .PP This typically corresponds to a monitor that displays part of the compositor space\&. .PP For objects version 3 onwards, after all xdg_output properties have been sent (when the object is created and when properties are updated), a wl_output\&.done event is sent\&. This allows changes to the output properties to be seen as atomic, even if they happen via multiple events\&. .PP Definition at line \fB7530\fP of file \fBwayland\-client\-protocol\-unstable\&.hpp\fP\&. .SH "Member Enumeration Documentation" .PP .SS "enum class \fBwayland::proxy_t::wrapper_type\fP\fC [strong]\fP, \fC [inherited]\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 "Member Function Documentation" .PP .SS "wl_proxy * wayland::proxy_t::c_ptr () const\fC [inherited]\fP" .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\fC [inherited]\fP" .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\fC [inherited]\fP" .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\fC [inherited]\fP" .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, \fC [inherited]\fP" .PP Get the type of a proxy object\&. .PP Definition at line \fB302\fP of file \fBwayland\-client\&.hpp\fP\&. .SS "std::function< void(std::string)> & zxdg_output_v1_t::on_description ()" .PP human-readable description of this output .PP \fBParameters\fP .RS 4 \fIdescription\fP output description .RE .PP Many compositors can produce human-readable descriptions of their outputs\&. The client may wish to know this description as well, to communicate the user for various purposes\&. .PP The description is a UTF-8 string with no convention defined for its contents\&. Examples might include 'Foocorp 11" Display' or 'Virtual X11 output via :1'\&. .PP The description event is sent after creating an xdg_output (see xdg_output_manager\&.get_xdg_output) and whenever the description changes\&. The description is optional, and may not be sent at all\&. .PP For objects of version 2 and lower, this event is only sent once per xdg_output, and the description does not change over the lifetime of the wl_output global\&. .PP Definition at line \fB9599\fP of file \fBwayland\-client\-protocol\-unstable\&.cpp\fP\&. .SS "std::function< void()> & zxdg_output_v1_t::on_done ()" .PP all information about the output have been sent This event is sent after all other properties of an xdg_output have been sent\&. .PP This allows changes to the xdg_output properties to be seen as atomic, even if they happen via multiple events\&. .PP For objects version 3 onwards, this event is deprecated\&. Compositors are not required to send it anymore and must send wl_output\&.done instead\&. .PP Definition at line \fB9589\fP of file \fBwayland\-client\-protocol\-unstable\&.cpp\fP\&. .SS "std::function< void(int32_t, int32_t)> & zxdg_output_v1_t::on_logical_position ()" .PP position of the output within the global compositor space .PP \fBParameters\fP .RS 4 \fIx\fP x position within the global compositor space .br \fIy\fP y position within the global compositor space .RE .PP The position event describes the location of the wl_output within the global compositor space\&. .PP The logical_position event is sent after creating an xdg_output (see xdg_output_manager\&.get_xdg_output) and whenever the location of the output changes within the global compositor space\&. .PP Definition at line \fB9579\fP of file \fBwayland\-client\-protocol\-unstable\&.cpp\fP\&. .SS "std::function< void(int32_t, int32_t)> & zxdg_output_v1_t::on_logical_size ()" .PP size of the output in the global compositor space .PP \fBParameters\fP .RS 4 \fIwidth\fP width in global compositor space .br \fIheight\fP height in global compositor space .RE .PP The logical_size event describes the size of the output in the global compositor space\&. .PP For example, a surface without any buffer scale, transformation nor rotation set, with the size matching the logical_size will have the same size as the corresponding output when displayed\&. .PP Most regular Wayland clients should not pay attention to the logical size and would rather rely on xdg_shell interfaces\&. .PP Some clients such as Xwayland, however, need this to configure their surfaces in the global compositor space as the compositor may apply a different scale from what is advertised by the output scaling property (to achieve fractional scaling, for example)\&. .PP For example, for a wl_output mode 3840×2160 and a scale factor 2: .PP .IP "\(bu" 2 A compositor not scaling the surface buffers will advertise a logical size of 3840×2160, .IP "\(bu" 2 A compositor automatically scaling the surface buffers will advertise a logical size of 1920×1080, .IP "\(bu" 2 A compositor using a fractional scale of 1\&.5 will advertise a logical size of 2560×1440\&. .PP .PP For example, for a wl_output mode 1920×1080 and a 90 degree rotation, the compositor will advertise a logical size of 1080x1920\&. .PP The logical_size event is sent after creating an xdg_output (see xdg_output_manager\&.get_xdg_output) and whenever the logical size of the output changes, either as a result of a change in the applied scale or because of a change in the corresponding output mode(see wl_output\&.mode) or transform (see wl_output\&.transform)\&. .PP Definition at line \fB9584\fP of file \fBwayland\-client\-protocol\-unstable\&.cpp\fP\&. .SS "std::function< void(std::string)> & zxdg_output_v1_t::on_name ()" .PP name of this output .PP \fBParameters\fP .RS 4 \fIname\fP output name .RE .PP Many compositors will assign names to their outputs, show them to the user, allow them to be configured by name, etc\&. The client may wish to know this name as well to offer the user similar behaviors\&. .PP The naming convention is compositor defined, but limited to alphanumeric characters and dashes (-)\&. Each name is unique among all wl_output globals, but if a wl_output global is destroyed the same name may be reused later\&. The names will also remain consistent across sessions with the same hardware and software configuration\&. .PP Examples of names include 'HDMI-A-1', 'WL-1', 'X11-1', etc\&. However, do not assume that the name is a reflection of an underlying DRM connector, X11 connection, etc\&. .PP The name event is sent after creating an xdg_output (see xdg_output_manager\&.get_xdg_output)\&. This event is only sent once per xdg_output, and the name does not change over the lifetime of the wl_output global\&. .PP Definition at line \fB9594\fP of file \fBwayland\-client\-protocol\-unstable\&.cpp\fP\&. .SS "wayland::proxy_t::operator bool () const\fC [inherited]\fP" .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\fC [inherited]\fP" .PP Check whether two wrappers refer to different objects\&. .SS "bool wayland::proxy_t::operator== (const \fBproxy_t\fP & right) const\fC [inherited]\fP" .PP Check whether two wrappers refer to the same object\&. .SS "bool wayland::proxy_t::proxy_has_object () const\fC [inherited]\fP" .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 ()\fC [inherited]\fP" .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)\fC [inherited]\fP" .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\&.