---
name: "wayland_server_presentation_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_t"
---

# wayland\_server\_presentation\_t(3)

timed presentation related wl\_surface requests

## NAME

wayland::server::presentation\_t - timed presentation related wl\_surface requests

## SYNOPSIS

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

Inherits wayland::server::resource\_t.

### Public Member Functions

std::function\< void()\> & **on\_destroy** ()\
 unbind from the presentation interface  std::function\< void(**surface\_t**, **presentation\_feedback\_t**)\> & **on\_feedback** ()\
 request presentation feedback information  void **clock\_id** (uint32\_t clk\_id, bool post=true)\
 clock ID for timestamps  void **post\_invalid\_timestamp** (std::string const &msg)\
 Post error: invalid value in tv\_nsec.  void **post\_invalid\_flag** (std::string const &msg)\
 Post error: invalid flag.  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 **clock\_id\_since\_version** = 1\
 Minimum protocol version required for the **clock\_id** function.

## Detailed Description

timed presentation related wl\_surface requests

The main feature of this interface is accurate presentation timing feedback to ensure smooth video playback while maintaining audio/video synchronization. Some features use the concept of a presentation clock, which is defined in the presentation.clock\_id event.

A content update for a wl\_surface is submitted by a wl\_surface.commit request. Request 'feedback' associates with the wl\_surface.commit and provides feedback on the content update, particularly the final realized presentation time.

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

## Member Function Documentation

### void presentation\_t::clock\_id (uint32\_t clk\_id, bool post = `true`)

clock ID for timestamps

**Parameters**

*clk\_id* platform clock identifier

This event tells the client in which clock domain the compositor interprets the timestamps used by the presentation extension. This clock is called the presentation clock.

The compositor sends this event when the client binds to the presentation interface. The presentation clock does not change during the lifetime of the client connection.

The clock identifier is platform dependent. On Linux/glibc, the identifier value is one of the clockid\_t values accepted by clock\_gettime(). clock\_gettime() is defined by POSIX.1-2001.

Timestamps in this clock domain are expressed as tv\_sec\_hi, tv\_sec\_lo, tv\_nsec triples, each component being an unsigned 32-bit value. Whole seconds are in tv\_sec which is a 64-bit value combined from tv\_sec\_hi and tv\_sec\_lo, and the additional fractional part in tv\_nsec as nanoseconds. Hence, for valid timestamps tv\_nsec must be in \[0, 999999999\].

Note that clock\_id applies only to the presentation clock, and implies nothing about e.g. the timestamps used in the Wayland core protocol input events.

Compositors should prefer a clock which does not jump and is not slewed e.g. by NTP. The absolute value of the clock is irrelevant. Precision of one millisecond or better is recommended. Clients must be able to query the current clock value directly, not by asking the compositor.

Definition at line **702** 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.

### std::function\< void()\> & presentation\_t::on\_destroy ()

unbind from the presentation interface Informs the server that the client will no longer be using this protocol object. Existing objects created by this object are not affected.

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

### std::function\< void(surface\_t, presentation\_feedback\_t)\> & presentation\_t::on\_feedback ()

request presentation feedback information

**Parameters**

*surface* target surface \
 *callback* new feedback object

Request presentation feedback for the current content submission on the given surface. This creates a new presentation\_feedback object, which will deliver the feedback information once. If multiple presentation\_feedback objects are created for the same submission, they will all deliver the same information.

For details on what information is returned, see the presentation\_feedback interface.

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

### void presentation\_t::post\_invalid\_flag (std::string const & msg)

Post error: invalid flag.

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

### void presentation\_t::post\_invalid\_timestamp (std::string const & msg)

Post error: invalid value in tv\_nsec.

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

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

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

## Member Data Documentation

### constexpr std::uint32\_t wayland::server::presentation\_t::clock\_id\_since\_version = 1` [static]`, ` [constexpr]`

Minimum protocol version required for the **clock\_id** function.

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

## Author

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