---
name: "wayland_server_xdg_activation_token_v1_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_xdg_activation_token_v1_t"
---

# wayland\_server\_xdg\_activation\_token\_v1\_t(3)

an exported activation handle

## NAME

wayland::server::xdg\_activation\_token\_v1\_t - an exported activation handle

## SYNOPSIS

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

Inherits wayland::server::resource\_t.

### Public Member Functions

std::function\< void(uint32\_t, **seat\_t**)\> & **on\_set\_serial** ()\
 specifies the seat and serial of the activating event  std::function\< void(std::string)\> & **on\_set\_app\_id** ()\
 specifies the application being activated  std::function\< void(**surface\_t**)\> & **on\_set\_surface** ()\
 specifies the application being activated  std::function\< void()\> & **on\_commit** ()\
 issues the token request  std::function\< void()\> & **on\_destroy** ()\
 destroy the xdg\_activation\_token\_v1 object  void **done** (std::string const &token, bool post=true)\
 the exported activation token  void **post\_already\_used** (std::string const &msg)\
 Post error: The token has already been used previously.  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 **done\_since\_version** = 1\
 Minimum protocol version required for the **done** function.

## Detailed Description

an exported activation handle

An object for setting up a token and receiving a token handle that can be passed as an activation token to another client.

The object is created using the xdg\_activation\_v1.get\_activation\_token request. This object should then be populated with the app\_id, surface and serial information and committed. The compositor shall then issue a done event with the token. In case the request's parameters are invalid, the compositor will provide an invalid token.

Definition at line **7598** of file **wayland-server-protocol-unstable.hpp**.

## Member Function Documentation

### void xdg\_activation\_token\_v1\_t::done (std::string const & token, bool post = `true`)

the exported activation token

**Parameters**

*token* the exported activation token

The 'done' event contains the unique token of this activation request and notifies that the provider is done.

Applications will typically receive the token through the XDG\_ACTIVATION\_TOKEN environment variable as set by its launcher, and should unset the environment variable right after this request, in order to avoid propagating it to child processes.

Applications implementing the D-Bus interface org.freedesktop.Application should get their token under XDG\_ACTIVATION\_TOKEN on their platform\_data.

Presentation tokens may be transferred across clients through means not described in this protocol.

Definition at line **7508** of file **wayland-server-protocol-unstable.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()\> & xdg\_activation\_token\_v1\_t::on\_commit ()

issues the token request Requests an activation token based on the different parameters that have been offered through set\_serial, set\_surface and set\_app\_id.

Definition at line **7496** of file **wayland-server-protocol-unstable.cpp**.

### std::function\< void()\> & xdg\_activation\_token\_v1\_t::on\_destroy ()

destroy the xdg\_activation\_token\_v1 object Notify the compositor that the xdg\_activation\_token\_v1 object will no longer be used.

Definition at line **7502** of file **wayland-server-protocol-unstable.cpp**.

### std::function\< void(std::string)\> & xdg\_activation\_token\_v1\_t::on\_set\_app\_id ()

specifies the application being activated

**Parameters**

*app\_id* the application id of the client being activated.

The requesting client can specify an app\_id to associate the token being created with it.

Must be sent before commit. This information is optional.

Definition at line **7484** of file **wayland-server-protocol-unstable.cpp**.

### std::function\< void(uint32\_t, seat\_t)\> & xdg\_activation\_token\_v1\_t::on\_set\_serial ()

specifies the seat and serial of the activating event

**Parameters**

*serial* the serial of the event that triggered the activation \
 *seat* the wl\_seat of the event

Provides information about the seat and serial event that requested the token.

Must be sent before commit. This information is optional.

Definition at line **7478** of file **wayland-server-protocol-unstable.cpp**.

### std::function\< void(surface\_t)\> & xdg\_activation\_token\_v1\_t::on\_set\_surface ()

specifies the application being activated

**Parameters**

*surface* the requesting surface

The requesting client can specify a surface to associate the token being created with it.

Must be triggered before commit. This information is optional.

Definition at line **7490** of file **wayland-server-protocol-unstable.cpp**.

### void xdg\_activation\_token\_v1\_t::post\_already\_used (std::string const & msg)

Post error: The token has already been used previously.

Definition at line **7513** of file **wayland-server-protocol-unstable.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::xdg\_activation\_token\_v1\_t::done\_since\_version = 1` [static]`, ` [constexpr]`

Minimum protocol version required for the **done** function.

Definition at line **7700** of file **wayland-server-protocol-unstable.hpp**.

## Author

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