.TH "wayland::server::presentation_feedback_t" 3 "Wed May 1 2024 17:27:19" "Version 1.0.0" "Wayland++" \" -*- nroff -*- .ad l .nh .SH NAME wayland::server::presentation_feedback_t \- presentation time feedback event .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits wayland::server::resource_t\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "void \fBsync_output\fP (\fBoutput_t\fP const &output, bool post=true)" .br .RI "presentation synchronized to this output " .ti -1c .RI "void \fBpresented\fP (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, \fBpresentation_feedback_kind\fP const &flags, bool post=true)" .br .RI "the content update was displayed " .ti -1c .RI "void \fBdiscarded\fP (bool post=true)" .br .RI "the content update was not displayed " .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 \fBsync_output_since_version\fP = 1" .br .RI "Minimum protocol version required for the \fBsync_output\fP function\&. " .ti -1c .RI "static constexpr std::uint32_t \fBpresented_since_version\fP = 1" .br .RI "Minimum protocol version required for the \fBpresented\fP function\&. " .ti -1c .RI "static constexpr std::uint32_t \fBdiscarded_since_version\fP = 1" .br .RI "Minimum protocol version required for the \fBdiscarded\fP function\&. " .in -1c .SH "Detailed Description" .PP 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\&. .PP Once a presentation_feedback object has delivered a 'presented' or 'discarded' event it is automatically destroyed\&. .PP Definition at line \fB213\fP of file \fBwayland\-server\-protocol\-extra\&.hpp\fP\&. .SH "Member Function Documentation" .PP .SS "void presentation_feedback_t::discarded (bool post = \fCtrue\fP)" .PP the content update was not displayed The content update was never displayed to the user\&. .PP Definition at line \fB762\fP of file \fBwayland\-server\-protocol\-extra\&.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 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 "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, \fBpresentation_feedback_kind\fP const & flags, bool post = \fCtrue\fP)" .PP the content update was displayed .PP \fBParameters\fP .RS 4 \fItv_sec_hi\fP high 32 bits of the seconds part of the presentation timestamp .br \fItv_sec_lo\fP low 32 bits of the seconds part of the presentation timestamp .br \fItv_nsec\fP nanoseconds part of the presentation timestamp .br \fIrefresh\fP nanoseconds till next refresh .br \fIseq_hi\fP high 32 bits of refresh counter .br \fIseq_lo\fP low 32 bits of refresh counter .br \fIflags\fP combination of 'kind' values .RE .PP 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\&. .PP 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\&. .PP 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)\&. .PP 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\&. .PP If the output does not have a constant refresh rate, explicit video mode switches excluded, then the refresh argument must be zero\&. .PP 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\&. .PP 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\&. .PP Definition at line \fB757\fP of file \fBwayland\-server\-protocol\-extra\&.cpp\fP\&. .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 presentation_feedback_t::sync_output (\fBoutput_t\fP const & output, bool post = \fCtrue\fP)" .PP presentation synchronized to this output .PP \fBParameters\fP .RS 4 \fIoutput\fP presentation output .RE .PP 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\&. .PP 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\&. .PP Definition at line \fB752\fP of file \fBwayland\-server\-protocol\-extra\&.cpp\fP\&. .SH "Member Data Documentation" .PP .SS "constexpr std::uint32_t wayland::server::presentation_feedback_t::discarded_since_version = 1\fC [static]\fP, \fC [constexpr]\fP" .PP Minimum protocol version required for the \fBdiscarded\fP function\&. .PP Definition at line \fB324\fP of file \fBwayland\-server\-protocol\-extra\&.hpp\fP\&. .SS "constexpr std::uint32_t wayland::server::presentation_feedback_t::presented_since_version = 1\fC [static]\fP, \fC [constexpr]\fP" .PP Minimum protocol version required for the \fBpresented\fP function\&. .PP Definition at line \fB313\fP of file \fBwayland\-server\-protocol\-extra\&.hpp\fP\&. .SS "constexpr std::uint32_t wayland::server::presentation_feedback_t::sync_output_since_version = 1\fC [static]\fP, \fC [constexpr]\fP" .PP Minimum protocol version required for the \fBsync_output\fP function\&. .PP Definition at line \fB255\fP of file \fBwayland\-server\-protocol\-extra\&.hpp\fP\&. .SH "Author" .PP Generated automatically by Doxygen for Wayland++ from the source code\&.