---
name: "wayland_server_presentation_feedback_t"
section: "3"
platform: "linux"
package: "waylandpp-dev"
version: "1.0.0-6+b2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/wayland_server_presentation_feedback_t"
---

# wayland\_server\_presentation\_feedback\_t(3)

presentation time feedback event

## NAME

wayland::server::presentation\_feedback\_t - presentation time feedback event

## SYNOPSIS

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

Inherits wayland::server::resource\_t.

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

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

## Member Function Documentation

### void presentation\_feedback\_t::discarded (bool post = `true`)

the content update was not displayed The content update was never displayed to the user.

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

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

### client\_t wayland::server::resource\_t::get\_client () const` [inherited]`

Get the associated client

**Returns**

the client that owns the resource.

### uint32\_t wayland::server::resource\_t::get\_id () const` [inherited]`

Get the internal ID of the resource

**Returns**

the internal ID of the resource

### unsigned int wayland::server::resource\_t::get\_version () const` [inherited]`

Get interface version

**Returns**

Interface version this resource has been constructed with.

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

### 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

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

### 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

### void presentation\_feedback\_t::sync\_output (output\_t const & output, bool post = `true`)

presentation synchronized to this output

**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

### constexpr 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 **324** of file **wayland-server-protocol-extra.hpp**.

### constexpr 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 **313** of file **wayland-server-protocol-extra.hpp**.

### constexpr 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 **255** of file **wayland-server-protocol-extra.hpp**.

## Author

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