Wayland++ 1.0.0
C++ Bindings for Wayland
Loading...
Searching...
No Matches
wayland::server::data_device_manager_t Class Reference

data transfer interface More...

#include <wayland-server-protocol.hpp>

Public Member Functions

std::function< void(data_source_t)> & on_create_data_source ()
 create a new data source
 
std::function< void(data_device_t, seat_t)> & on_get_data_device ()
 create a new data device
 
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 ()
 

Detailed Description

data transfer interface

The wl_data_device_manager is a singleton global object that provides access to inter-client data transfer mechanisms such as copy-and-paste and drag-and-drop. These mechanisms are tied to a wl_seat and this interface lets a client get a wl_data_device corresponding to a wl_seat.

Depending on the version bound, the objects created from the bound wl_data_device_manager object will have different requirements for functioning properly. See wl_data_source.set_actions, wl_data_offer.accept and wl_data_offer.finish for details.

Definition at line 1564 of file wayland-server-protocol.hpp.

Member Function Documentation

◆ 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_create_data_source()

std::function< void(data_source_t)> & data_device_manager_t::on_create_data_source ( )

create a new data source

Parameters
iddata source to create

Create a new data source.

Definition at line 2169 of file wayland-server-protocol.cpp.

◆ on_get_data_device()

std::function< void(data_device_t, seat_t)> & data_device_manager_t::on_get_data_device ( )

create a new data device

Parameters
iddata device to create
seatseat associated with the data device

Create a new data device for a given seat.

Definition at line 2175 of file wayland-server-protocol.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

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