Loading...
Searching...
No Matches
wayland::server::xdg_activation_token_v1_t Class Reference

an exported activation handle More...

`#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 7599 of file wayland-server-protocol-unstable.hpp.

## Member Function Documentation

## done()

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.

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

## on_commit()

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.

## on_destroy()

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.

## on_set_app_id()

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.

## on_set_serial()

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.

## on_set_surface()

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.

## post_already_used()

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.

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

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

## Member Data Documentation

## done_since_version

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 7701 of file wayland-server-protocol-unstable.hpp.

The documentation for this class was generated from the following files:

- obj-x86_64-linux-gnu/wayland-server-protocol-unstable.hpp
- obj-x86_64-linux-gnu/wayland-server-protocol-unstable.cpp