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 outputvoid 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 displayedvoid discarded (bool post=true)β the content update was not displayedbool proxy_has_object () constβ Check whether this wrapper actually wraps an object.void post_no_memory () constuint32_t get_id () constclient_t get_client () constunsigned int get_version () conststd::string get_class ()
π Static Public Attributes π
static constexpr std::uint32_t sync_output_since_version = 1β Minimum protocol version required for thesync_outputfunction.static constexpr std::uint32_t presented_since_version = 1β Minimum protocol version required for thepresentedfunction.static constexpr std::uint32_t discarded_since_version = 1β Minimum protocol version required for thediscardedfunction.
π¦ 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 timestamptv_sec_loβ low 32 bits of the seconds part of the presentation timestamptv_nsecβ nanoseconds part of the presentation timestamprefreshβ nanoseconds till next refreshseq_hiβ high 32 bits of refresh counterseq_loβ low 32 bits of refresh counterflagsβ 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
- ubuntu stonking: waylandpp-dev 1.0.1-2 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms