wayland::output_t(3)

πŸŽ€ wayland::output_t(3) β€” Wayland++ πŸŽ€

okay bestie, welcome to the Wayland++ manual page for wayland::output_t. this one is all about the compositor output region, and yes it's giving very main-character protocol energy πŸ’…βœ¨


🌸 NAME 🌸

wayland::output_t β€” compositor output region. literally the whole vibe of this page 🫢


✨ SYNOPSIS ✨

#include <wayland-client-protocol.hpp>

Inherits wayland::proxy_t. periodt.

πŸ’– Public Types πŸ’–

  • enum class wrapper_type { standard, display, foreign, proxy_wrapper } β€” the wrapper-type enum. the full breakdown is down in the enum docs, so don't scroll away too fast πŸ‘€

πŸ¦‹ Public Member Functions πŸ¦‹

  • void release () β€” release the output object πŸ”₯
  • bool can_release () const β€” check whether the release function is available with the currently bound version of the protocol βœ…
  • std::function< void(int32_t, int32_t, int32_t, int32_t, output_subpixel, std::string, std::string, output_transform)> & on_geometry () β€” properties of the output ✨
  • std::function< void(output_mode, int32_t, int32_t, int32_t)> & on_mode () β€” advertise available modes for the output 🌈
  • std::function< void()> & on_done () β€” sent all information about output. that's the "we're done here" signal πŸ’€
  • std::function< void(int32_t)> & on_scale () β€” output scaling properties πŸŽ€
  • std::function< void(std::string)> & on_name () β€” name of this output 🏷️
  • std::function< void(std::string)> & on_description () β€” human-readable description of this output 🫢
  • 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. yes, same energy, different syntax πŸ’…
  • 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. bye-bye object πŸ‘‹

πŸ‘‘ Static Public Attributes πŸ‘‘

  • static constexpr std::uint32_t release_since_version = 3 β€” minimum protocol version required for the release function. no cap, version 3 is the gatekeeper πŸ”

πŸ’œ Detailed Description πŸ’œ

compositor output region β€” yup, that's the headline 🎬

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. typically this 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. so like, hotplug girl summer πŸ”ŒπŸŒΈ

Definition at line 3484 of file wayland-client-protocol.hpp.


🧚 Member Enumeration Documentation 🧚

🌟 enum class wayland::proxy_t::wrapper_type [strong], [inherited] 🌟

Underlying wl_proxy type and properties of a proxy_t that affect construction, destruction, and event handling. this enum is basically the vibe check for how a wrapper behaves 🫢

✨ Enumerator ✨

  • 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. classic behavior, no notes πŸ’…
  • 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. display-coded πŸ‘‘
  • 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. ⚠️ okay so this one is very "look, don't touch" energy β€” keep those wrappers short-lived, bestie.
  • 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. reference-counted and holding on for dear life πŸ«ΆπŸ”—

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

πŸ’… Member Function Documentation πŸ’…

wl_proxy * wayland::proxy_t::c_ptr () const [inherited]

Okay bestie, this one hands you the raw C pointer under the wrapper. So iconic of it.

Returns: the underlying wl_proxy wrapped by this proxy_t if it exists β€” otherwise an exception gets thrown. 😭


bool output_t::can_release () const

Vibe check: is the release function available with the protocol version you're currently bound to? That's the whole question. 🫢

Definition at line 3368 of file wayland-client-protocol.cpp.


std::string wayland::proxy_t::get_class () const [inherited]

Gets the interface name (class) of a proxy object. Like a little name tag for your object. πŸŽ€

Returns: the interface name of the object associated with the proxy.


uint32_t wayland::proxy_t::get_id () const [inherited]

Gets the id of a proxy object. Every object's got its own little number, iykyk. ✨

Returns: the id the object associated with the proxy.


uint32_t wayland::proxy_t::get_version () const [inherited]

Gets the protocol object version of a proxy object, or 0 if the proxy was created with unversioned API.

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.

display_t will always return version 0. No cap.

Returns: the protocol object version of the proxy or 0.


wrapper_type wayland::proxy_t::get_wrapper_type () const [inline], [inherited]

Gets the type of a proxy object. Cute little type check moment. πŸ¦‹

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


std::function< void(std::string)> & output_t::on_description ()

Human-readable description of this output, bestie. Yes please.

Parameters:

  • description β€” output description

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.

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

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.

The description event will be followed by a done event.

Definition at line 3399 of file wayland-client-protocol.cpp.


std::function< void()> & output_t::on_done ()

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. Lowkey the clean-up queen of output events. πŸ‘‘

Definition at line 3384 of file wayland-client-protocol.cpp.


output_t::on_geometry ()

Here's the exact signature so nothing gets lost:

std::function< void(int32_t, int32_t, int32_t, int32_t, output_subpixel, std::string, std::string, output_transform)> & output_t::on_geometry ()

Properties of the output. 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.

Parameters:

  • x β€” x position within the global compositor space
  • y β€” y position within the global compositor space
  • physical_width β€” width in millimeters of the output
  • physical_height β€” height in millimeters of the output
  • subpixel β€” subpixel orientation of the output
  • make β€” textual description of the manufacturer
  • model β€” textual description of the model
  • transform β€” transform that maps framebuffer to output

The physical size can be set to zero if it doesn't make sense for this output (e.g. for projectors or virtual outputs).

The geometry event will be followed by a done event (starting from version 2).

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.

Definition at line 3374 of file wayland-client-protocol.cpp.


output_t::on_mode ()

Exact signature, character for character:

std::function< void(output_mode, int32_t, int32_t, int32_t)> & output_t::on_mode ()

Advertise available modes for the output. The mode event describes an available mode for the output.

Parameters:

  • flags β€” bitfield of mode flags
  • width β€” width of the mode in hardware units
  • height β€” height of the mode in hardware units
  • refresh β€” vertical refresh rate in mHz

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.

Deprecated alert: 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.

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.

The vertical refresh rate can be set to zero if it doesn't make sense for this output (e.g. for virtual outputs).

The mode event will be followed by a done event (starting from version 2).

Clients should not use the refresh rate to schedule frames. Instead, they should use the wl_surface.frame event or the presentation-time protocol. Fr fr, don't do it.

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.

Definition at line 3379 of file wayland-client-protocol.cpp.


std::function< void(std::string)> & output_t::on_name ()

Name of this output. Cute little identifier moment. 🌸

Parameters:

  • name β€” output name

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.

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.

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.

The name is not guaranteed to be persistent across sessions, thus cannot be used to reliably identify an output in e.g. configuration files.

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.

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.

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.

The name event will be followed by a done event.

Definition at line 3394 of file wayland-client-protocol.cpp.


std::function< void(int32_t)> & output_t::on_scale ()

Output scaling properties. Big "make it legible" energy. πŸ”₯

Parameters:

  • factor β€” scaling factor of output

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.

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.

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.

The scale event will be followed by a done event.

Definition at line 3389 of file wayland-client-protocol.cpp.


wayland::proxy_t::operator bool () const [inherited]

Check whether this wrapper actually wraps an object. Like, does it actually have something in it or is it just vibes? πŸ’€

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


bool wayland::proxy_t::operator!= (const proxy_t & right) const [inherited]

Check whether two wrappers refer to different objects. Not the same, bestie. πŸ™ˆ


bool wayland::proxy_t::operator== (const proxy_t & right) const [inherited]

Check whether two wrappers refer to the same object. Same object, same vibe. πŸ’–


bool wayland::proxy_t::proxy_has_object () const [inherited]

Check whether this wrapper actually wraps an object.

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


void wayland::proxy_t::proxy_release () [inherited]

Release the wrapped object (if any), making this an empty wrapper.

Important: note that display_t instances cannot be released this way. Attempts to do so are ignored.

Examples: foreign_display.cpp.


void output_t::release ()

Release the output object. Using this request a client can tell the server that it is not going to use the output object anymore. Bye-bye output, no hard feelings. ✌️

Definition at line 3363 of file wayland-client-protocol.cpp.


void wayland::proxy_t::set_queue (event_queue_t queue) [inherited]

Assign a proxy to an event queue. Put it in its little lane. ✨

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.

See also: display_t::dispatch_queue().

Examples: proxy_wrapper.cpp.


πŸŽ€ Member Data Documentation πŸŽ€

std::uint32_t wayland::output_t::release_since_version = 3 [static], [constexpr]

Minimum protocol version required for the release function. So if you're on an older version, that's the gatekeeping number right there. πŸ’…

Definition at line 3522 of file wayland-client-protocol.hpp.


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for Wayland++ from the source code.


Mwah πŸ’‹ this lil masterpiece is from Wayland++ version 1.0.1, dated Fri Mar 27 2026 13:15:00, and it's serving wayland::output_t(3) realness. Bye bestie, go read some more manpages 🫢🌈

πŸ“¦ where this page comes from