wayland::serve...ion_feedback_t(3)

okay bestie, this is wayland::serve...ion_feedback_t(3) from the Wayland++ manual β€” the whole page is about presentation time feedback events, and yes we’re gonna make it cute and accurate πŸ’–

🌸 NAME 🌸

wayland::server::presentation_feedback_t β€” presentation time feedback event ✨

✨ SYNOPSIS ✨

Include this header, bestie:

#include <wayland-server-protocol-extra.hpp>

πŸ’– Public Member Functions πŸ’–

  • void sync_output (output_t const &output, bool post=true) β€” presentation synchronized to this output
  • void presented (uint32_t tv_sec_hi, uint32_t tv_sec_lo, uint32_t tv_nsec, uint32_t refresh, uint32_t seq_hi, uint32_t seq_lo, presentation_feedback_kind const &flags, bool post=true) β€” the content update was displayed
  • void discarded (bool post=true) β€” the content update was not displayed
  • bool proxy_has_object () const β€” Check whether this wrapper actually wraps an object.
  • void post_no_memory () const
  • uint32_t get_id () const
  • client_t get_client () const
  • unsigned int get_version () const
  • std::string get_class ()

πŸ’– Static Public Attributes πŸ’–

  • static constexpr std::uint32_t sync_output_since_version = 1 β€” Minimum protocol version required for the sync_output function.
  • static constexpr std::uint32_t presented_since_version = 1 β€” Minimum protocol version required for the presented function.
  • static constexpr std::uint32_t discarded_since_version = 1 β€” Minimum protocol version required for the discarded function.

πŸ¦‹ DETAILED DESCRIPTION πŸ¦‹

presentation time feedback event πŸ’…

A presentation_feedback object returns an indication that a wl_surface content update has become visible to the user. One object corresponds to one content update submission (wl_surface.commit). There are two possible outcomes: the content update is presented to the user, and a presentation timestamp delivered; or, the user did not see the content update because it was superseded or its surface destroyed, and the content update is discarded.

Once a presentation_feedback object has delivered a 'presented' or 'discarded' event it is automatically destroyed. iconic behavior, honestly πŸ‘‘

Definition at line 214 of file wayland-server-protocol-extra.hpp.

πŸŽ€ MEMBER FUNCTION DOCUMENTATION πŸŽ€

πŸ’– discarded πŸ’–

void presentation_feedback_t::discarded (bool post = true)

the content update was not displayed β€” the content update was never displayed to the user. that’s the whole mood 😭

Definition at line 762 of file wayland-server-protocol-extra.cpp.

πŸ’– get_class πŸ’–

std::string wayland::server::resource_t::get_class () [inherited]

Retrieve the interface name (class) of a resource object.

Returns

Interface name of the resource object.

πŸ’– get_client πŸ’–

client_t wayland::server::resource_t::get_client () const [inherited]

Get the associated client.

Returns

the client that owns the resource.

πŸ’– get_id πŸ’–

uint32_t wayland::server::resource_t::get_id () const [inherited]

Get the internal ID of the resource.

Returns

the internal ID of the resource.

πŸ’– get_version πŸ’–

unsigned int wayland::server::resource_t::get_version () const [inherited]

Get interface version.

Returns

Interface version this resource has been constructed with.

πŸ’– post_no_memory πŸ’–

void wayland::server::resource_t::post_no_memory () const [inherited]

Post "not enough memory" error to the client.

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. lowkey useful 🫢

πŸ’– presented πŸ’–

void presentation_feedback_t::presented (uint32_t tv_sec_hi, uint32_t tv_sec_lo, uint32_t tv_nsec, uint32_t refresh, uint32_t seq_hi, uint32_t seq_lo, presentation_feedback_kind const & flags, bool post = true)

the content update was displayed β€” yes bestie, this is the big one πŸ’–

Parameters

  • tv_sec_hi β€” high 32 bits of the seconds part of the presentation timestamp
  • tv_sec_lo β€” low 32 bits of the seconds part of the presentation timestamp
  • tv_nsec β€” nanoseconds part of the presentation timestamp
  • refresh β€” nanoseconds till next refresh
  • seq_hi β€” high 32 bits of refresh counter
  • seq_lo β€” low 32 bits of refresh counter
  • flags β€” combination of 'kind' values

The associated content update was displayed to the user at the indicated time (tv_sec_hi/lo, tv_nsec). For the interpretation of the timestamp, see presentation.clock_id event.

The timestamp corresponds to the time when the content update turned into light the first time on the surface’s main output. Compositors may approximate this from the framebuffer flip completion events from the system, and the latency of the physical display path if known.

This event is preceded by all related sync_output events telling which output’s refresh cycle the feedback corresponds to, i.e. the main output for the surface. Compositors are recommended to choose the output containing the largest part of the wl_surface, or keeping the output they previously chose. Having a stable presentation output association helps clients predict future output refreshes (vblank).

The 'refresh' argument gives the compositor’s prediction of how many nanoseconds after tv_sec, tv_nsec the very next output refresh may occur. This is to further aid clients in predicting future refreshes, i.e., estimating the timestamps targeting the next few vblanks. If such prediction cannot usefully be done, the argument is zero.

If the output does not have a constant refresh rate, explicit video mode switches excluded, then the refresh argument must be zero.

The 64-bit value combined from seq_hi and seq_lo is the value of the output’s vertical retrace counter when the content update was first scanned out to the display. This value must be compatible with the definition of MSC in GLX_OML_sync_control specification. Note, that if the display path has a non-zero latency, the time instant specified by this counter may differ from the timestamp’s.

If the output does not have a concept of vertical retrace or a refresh cycle, or the output device is self-refreshing without a way to query the refresh count, then the arguments seq_hi and seq_lo must be zero.

Definition at line 757 of file wayland-server-protocol-extra.cpp.

πŸ’– proxy_has_object πŸ’–

bool wayland::server::resource_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.

πŸ’– sync_output πŸ’–

void presentation_feedback_t::sync_output (output_t const & output, bool post = true)

presentation synchronized to this output β€” the β€œwhich output, bestie?” event πŸ¦‹

Parameters

  • output β€” presentation output

As presentation can be synchronized to only one output at a time, this event tells which output it was. This event is only sent prior to the presented event.

As clients may bind to the same global wl_output multiple times, this event is sent for each bound instance that matches the synchronized output. If a client has not bound to the right wl_output global at all, this event is not sent.

Definition at line 752 of file wayland-server-protocol-extra.cpp.

🌸 MEMBER DATA DOCUMENTATION 🌸

πŸ’– discarded_since_version πŸ’–

std::uint32_t wayland::server::presentation_feedback_t::discarded_since_version = 1

[static], [constexpr]

Minimum protocol version required for the discarded function.

Definition at line 325 of file wayland-server-protocol-extra.hpp.

πŸ’– presented_since_version πŸ’–

std::uint32_t wayland::server::presentation_feedback_t::presented_since_version = 1

[static], [constexpr]

Minimum protocol version required for the presented function.

Definition at line 314 of file wayland-server-protocol-extra.hpp.

πŸ’– sync_output_since_version πŸ’–

std::uint32_t wayland::server::presentation_feedback_t::sync_output_since_version = 1

[static], [constexpr]

Minimum protocol version required for the sync_output function.

Definition at line 256 of file wayland-server-protocol-extra.hpp.

πŸ‘‘ AUTHOR πŸ‘‘

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


okay that’s the whole page, bestie πŸ’– β€” generated automatically by Doxygen for Wayland++ from the source code, Version 1.0.1, dated Fri Mar 27 2026. Periodt. Go slay your presentation feedbacks πŸŽ€βœ¨

πŸ“¦ where this page comes from