.TH "wayland::server::output_t" 3 "Wed May 1 2024 17:27:19" "Version 1.0.0" "Wayland++" \" -*- nroff -*- .ad l .nh .SH NAME wayland::server::output_t \- compositor output region .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits wayland::server::resource_t\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "std::function< void()> & \fBon_release\fP ()" .br .RI "release the output object " .ti -1c .RI "void \fBgeometry\fP (int32_t x, int32_t y, int32_t physical_width, int32_t physical_height, output_subpixel const &subpixel, std::string const &make, std::string const &model, \fBoutput_transform\fP const &transform, bool post=true)" .br .RI "properties of the output " .ti -1c .RI "void \fBmode\fP (\fBoutput_mode\fP const &flags, int32_t width, int32_t height, int32_t refresh, bool post=true)" .br .RI "advertise available modes for the output " .ti -1c .RI "void \fBdone\fP (bool post=true)" .br .RI "sent all information about output " .ti -1c .RI "bool \fBcan_done\fP () const" .br .RI "Check whether the \fBdone\fP function is available with the currently bound version of the protocol\&. " .ti -1c .RI "void \fBscale\fP (int32_t factor, bool post=true)" .br .RI "output scaling properties " .ti -1c .RI "bool \fBcan_scale\fP () const" .br .RI "Check whether the \fBscale\fP function is available with the currently bound version of the protocol\&. " .ti -1c .RI "void \fBname\fP (std::string const &name, bool post=true)" .br .RI "name of this output " .ti -1c .RI "bool \fBcan_name\fP () const" .br .RI "Check whether the \fBname\fP function is available with the currently bound version of the protocol\&. " .ti -1c .RI "void \fBdescription\fP (std::string const &description, bool post=true)" .br .RI "human-readable description of this output " .ti -1c .RI "bool \fBcan_description\fP () const" .br .RI "Check whether the \fBdescription\fP function is available with the currently bound version of the protocol\&. " .ti -1c .RI "bool \fBproxy_has_object\fP () const" .br .RI "Check whether this wrapper actually wraps an object\&. " .ti -1c .RI "void \fBpost_no_memory\fP () const" .br .ti -1c .RI "uint32_t \fBget_id\fP () const" .br .ti -1c .RI "client_t \fBget_client\fP () const" .br .ti -1c .RI "unsigned int \fBget_version\fP () const" .br .ti -1c .RI "std::string \fBget_class\fP ()" .br .in -1c .SS "Static Public Attributes" .in +1c .ti -1c .RI "static constexpr std::uint32_t \fBgeometry_since_version\fP = 1" .br .RI "Minimum protocol version required for the \fBgeometry\fP function\&. " .ti -1c .RI "static constexpr std::uint32_t \fBmode_since_version\fP = 1" .br .RI "Minimum protocol version required for the \fBmode\fP function\&. " .ti -1c .RI "static constexpr std::uint32_t \fBdone_since_version\fP = 2" .br .RI "Minimum protocol version required for the \fBdone\fP function\&. " .ti -1c .RI "static constexpr std::uint32_t \fBscale_since_version\fP = 2" .br .RI "Minimum protocol version required for the \fBscale\fP function\&. " .ti -1c .RI "static constexpr std::uint32_t \fBname_since_version\fP = 4" .br .RI "Minimum protocol version required for the \fBname\fP function\&. " .ti -1c .RI "static constexpr std::uint32_t \fBdescription_since_version\fP = 4" .br .RI "Minimum protocol version required for the \fBdescription\fP function\&. " .in -1c .SH "Detailed Description" .PP compositor output region An output describes part of the compositor geometry\&. The compositor works in the 'compositor coordinate system' and an output corresponds to a rectangular area in that space that is actually visible\&. This typically corresponds to a monitor that displays part of the compositor space\&. This object is published as global during start up, or when a monitor is hotplugged\&. .PP Definition at line \fB3705\fP of file \fBwayland\-server\-protocol\&.hpp\fP\&. .SH "Member Function Documentation" .PP .SS "bool output_t::can_description () const" .PP Check whether the \fBdescription\fP function is available with the currently bound version of the protocol\&. .PP Definition at line \fB2993\fP of file \fBwayland\-server\-protocol\&.cpp\fP\&. .SS "bool output_t::can_done () const" .PP Check whether the \fBdone\fP function is available with the currently bound version of the protocol\&. .PP Definition at line \fB2963\fP of file \fBwayland\-server\-protocol\&.cpp\fP\&. .SS "bool output_t::can_name () const" .PP Check whether the \fBname\fP function is available with the currently bound version of the protocol\&. .PP Definition at line \fB2983\fP of file \fBwayland\-server\-protocol\&.cpp\fP\&. .SS "bool output_t::can_scale () const" .PP Check whether the \fBscale\fP function is available with the currently bound version of the protocol\&. .PP Definition at line \fB2973\fP of file \fBwayland\-server\-protocol\&.cpp\fP\&. .SS "void output_t::description (std::string const & description, bool post = \fCtrue\fP)" .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, e\&.g\&. for output selection purposes\&. .PP The description is a UTF-8 string with no convention defined for its contents\&. The description is not guaranteed to be unique among all wl_output globals\&. Examples might include 'Foocorp 11" Display' or 'Virtual X11 output via :1'\&. .PP The description event is sent after binding the output object and whenever the description changes\&. The description is optional, and may not be sent at all\&. .PP The description event will be followed by a done event\&. .PP Definition at line \fB2988\fP of file \fBwayland\-server\-protocol\&.cpp\fP\&. .SS "void output_t::done (bool post = \fCtrue\fP)" .PP sent all information about output This event is sent after all other properties have been sent after binding to the output object and after any other property changes done after that\&. This allows changes to the output properties to be seen as atomic, even if they happen via multiple events\&. .PP Definition at line \fB2958\fP of file \fBwayland\-server\-protocol\&.cpp\fP\&. .SS "void output_t::geometry (int32_t x, int32_t y, int32_t physical_width, int32_t physical_height, output_subpixel const & subpixel, std::string const & make, std::string const & model, \fBoutput_transform\fP const & transform, bool post = \fCtrue\fP)" .PP properties of the output .PP \fBParameters\fP .RS 4 \fIx\fP x position within the global compositor space .br \fIy\fP y position within the global compositor space .br \fIphysical_width\fP width in millimeters of the output .br \fIphysical_height\fP height in millimeters of the output .br \fIsubpixel\fP subpixel orientation of the output .br \fImake\fP textual description of the manufacturer .br \fImodel\fP textual description of the model .br \fItransform\fP transform that maps framebuffer to output .RE .PP The geometry event describes geometric properties of the output\&. The event is sent when binding to the output object and whenever any of the properties change\&. .PP The physical size can be set to zero if it doesn't make sense for this output (e\&.g\&. for projectors or virtual outputs)\&. .PP The geometry event will be followed by a done event (starting from version 2)\&. .PP Note: wl_output only advertises partial information about the output position and identification\&. Some compositors, for instance those not implementing a desktop-style output layout or those exposing virtual outputs, might fake this information\&. Instead of using x and y, clients should use xdg_output\&.logical_position\&. Instead of using make and model, clients should use name and description\&. .PP Definition at line \fB2948\fP of file \fBwayland\-server\-protocol\&.cpp\fP\&. .SS "std::string wayland::server::resource_t::get_class ()\fC [inherited]\fP" Retrieve the interface name (class) of a resource object\&. .PP \fBReturns\fP .RS 4 Interface name of the resource object\&. .RE .PP .SS "client_t wayland::server::resource_t::get_client () const\fC [inherited]\fP" Get the associated client .PP \fBReturns\fP .RS 4 the client that owns the resource\&. .RE .PP .SS "uint32_t wayland::server::resource_t::get_id () const\fC [inherited]\fP" Get the internal ID of the resource .PP \fBReturns\fP .RS 4 the internal ID of the resource .RE .PP .SS "unsigned int wayland::server::resource_t::get_version () const\fC [inherited]\fP" Get interface version .PP \fBReturns\fP .RS 4 Interface version this resource has been constructed with\&. .RE .PP .SS "void output_t::mode (\fBoutput_mode\fP const & flags, int32_t width, int32_t height, int32_t refresh, bool post = \fCtrue\fP)" .PP advertise available modes for the output .PP \fBParameters\fP .RS 4 \fIflags\fP bitfield of mode flags .br \fIwidth\fP width of the mode in hardware units .br \fIheight\fP height of the mode in hardware units .br \fIrefresh\fP vertical refresh rate in mHz .RE .PP The mode event describes an available mode for the output\&. .PP The event is sent when binding to the output object and there will always be one mode, the current mode\&. The event is sent again if an output changes mode, for the mode that is now current\&. In other words, the current mode is always the last mode that was received with the current flag set\&. .PP Non-current modes are deprecated\&. A compositor can decide to only advertise the current mode and never send other modes\&. Clients should not rely on non-current modes\&. .PP The size of a mode is given in physical hardware units of the output device\&. This is not necessarily the same as the output size in the global compositor space\&. For instance, the output may be scaled, as described in wl_output\&.scale, or transformed, as described in wl_output\&.transform\&. Clients willing to retrieve the output size in the global compositor space should use xdg_output\&.logical_size instead\&. .PP The vertical refresh rate can be set to zero if it doesn't make sense for this output (e\&.g\&. for virtual outputs)\&. .PP The mode event will be followed by a done event (starting from version 2)\&. .PP Clients should not use the refresh rate to schedule frames\&. Instead, they should use the wl_surface\&.frame event or the presentation-time protocol\&. .PP Note: this information is not always meaningful for all outputs\&. Some compositors, such as those exposing virtual outputs, might fake the refresh rate or the size\&. .PP Definition at line \fB2953\fP of file \fBwayland\-server\-protocol\&.cpp\fP\&. .SS "void output_t::name (std::string const & name, bool post = \fCtrue\fP)" .PP name of this output .PP \fBParameters\fP .RS 4 \fIname\fP output name .RE .PP Many compositors will assign user-friendly names to their outputs, show them to the user, allow the user to refer to an output, etc\&. The client may wish to know this name as well to offer the user similar behaviors\&. .PP The name is a UTF-8 string with no convention defined for its contents\&. Each name is unique among all wl_output globals\&. The name is only guaranteed to be unique for the compositor instance\&. .PP The same output name is used for all clients for a given wl_output global\&. Thus, the name can be shared across processes to refer to a specific wl_output global\&. .PP The name is not guaranteed to be persistent across sessions, thus cannot be used to reliably identify an output in e\&.g\&. configuration files\&. .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 binding the output object\&. This event is only sent once per output object, and the name does not change over the lifetime of the wl_output global\&. .PP Compositors may re-use the same output name if the wl_output global is destroyed and re-created later\&. Compositors should avoid re-using the same name if possible\&. .PP The name event will be followed by a done event\&. .PP Definition at line \fB2978\fP of file \fBwayland\-server\-protocol\&.cpp\fP\&. .SS "std::function< void()> & output_t::on_release ()" .PP release the output object Using this request a client can tell the server that it is not going to use the output object anymore\&. .PP Definition at line \fB2942\fP of file \fBwayland\-server\-protocol\&.cpp\fP\&. .SS "void wayland::server::resource_t::post_no_memory () const\fC [inherited]\fP" Post 'not enough memory' error to the client .PP If the compositor has not enough memory to fulfill a certail request of the client, this function can be called to notify the client of this circumstance\&. .SS "bool wayland::server::resource_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 output_t::scale (int32_t factor, bool post = \fCtrue\fP)" .PP output scaling properties .PP \fBParameters\fP .RS 4 \fIfactor\fP scaling factor of output .RE .PP This event contains scaling geometry information that is not in the geometry event\&. It may be sent after binding the output object or if the output scale changes later\&. If it is not sent, the client should assume a scale of 1\&. .PP A scale larger than 1 means that the compositor will automatically scale surface buffers by this amount when rendering\&. This is used for very high resolution displays where applications rendering at the native resolution would be too small to be legible\&. .PP It is intended that scaling aware clients track the current output of a surface, and if it is on a scaled output it should use wl_surface\&.set_buffer_scale with the scale of the output\&. That way the compositor can avoid scaling the surface, and the client can supply a higher detail image\&. .PP The scale event will be followed by a done event\&. .PP Definition at line \fB2968\fP of file \fBwayland\-server\-protocol\&.cpp\fP\&. .SH "Member Data Documentation" .PP .SS "constexpr std::uint32_t wayland::server::output_t::description_since_version = 4\fC [static]\fP, \fC [constexpr]\fP" .PP Minimum protocol version required for the \fBdescription\fP function\&. .PP Definition at line \fB3943\fP of file \fBwayland\-server\-protocol\&.hpp\fP\&. .SS "constexpr std::uint32_t wayland::server::output_t::done_since_version = 2\fC [static]\fP, \fC [constexpr]\fP" .PP Minimum protocol version required for the \fBdone\fP function\&. .PP Definition at line \fB3833\fP of file \fBwayland\-server\-protocol\&.hpp\fP\&. .SS "constexpr std::uint32_t wayland::server::output_t::geometry_since_version = 1\fC [static]\fP, \fC [constexpr]\fP" .PP Minimum protocol version required for the \fBgeometry\fP function\&. .PP Definition at line \fB3771\fP of file \fBwayland\-server\-protocol\&.hpp\fP\&. .SS "constexpr std::uint32_t wayland::server::output_t::mode_since_version = 1\fC [static]\fP, \fC [constexpr]\fP" .PP Minimum protocol version required for the \fBmode\fP function\&. .PP Definition at line \fB3818\fP of file \fBwayland\-server\-protocol\&.hpp\fP\&. .SS "constexpr std::uint32_t wayland::server::output_t::name_since_version = 4\fC [static]\fP, \fC [constexpr]\fP" .PP Minimum protocol version required for the \fBname\fP function\&. .PP Definition at line \fB3913\fP of file \fBwayland\-server\-protocol\&.hpp\fP\&. .SS "constexpr std::uint32_t wayland::server::output_t::scale_since_version = 2\fC [static]\fP, \fC [constexpr]\fP" .PP Minimum protocol version required for the \fBscale\fP function\&. .PP Definition at line \fB3869\fP of file \fBwayland\-server\-protocol\&.hpp\fP\&. .SH "Author" .PP Generated automatically by Doxygen for Wayland++ from the source code\&.