Wayland++ 1.0.0
C++ Bindings for Wayland
Loading...
Searching...
No Matches
wayland::server::global_t< resource > Class Template Reference

#include <wayland-server.hpp>

Inheritance diagram for wayland::server::global_t< resource >:
Collaboration diagram for wayland::server::global_t< resource >:

Public Member Functions

 global_t (display_t &display, unsigned int version=resource::max_version)
 
std::function< void(client_t, resource)> & on_bind ()
 
template<typename resource >
bool has_interface ()
 

Detailed Description

template<class resource>
class wayland::server::global_t< resource >

Global object.

Template Parameters
resourceResource class whose interface shall be used

Definition at line 624 of file wayland-server.hpp.

Constructor & Destructor Documentation

◆ global_t()

template<class resource >
wayland::server::global_t< resource >::global_t ( display_t & display,
unsigned int version = resource::max_version )
inline

Create a global object

Parameters
displayParent display object
versionInterface version

Definition at line 649 of file wayland-server.hpp.

Member Function Documentation

◆ has_interface()

template<typename resource >
bool wayland::server::global_base_t::has_interface ( )
inlineinherited

Check for specific interface.

Template Parameters
resourceResource class for comparison
Returns
true if the global has the same interface as the resource class

Definition at line 613 of file wayland-server.hpp.

◆ on_bind()

template<class resource >
std::function< void(client_t, resource)> & wayland::server::global_t< resource >::on_bind ( )
inline

Adds a listener for the bind signal.

When a client binds to a global object, registered listeners will be notified, carrying the client_t object and the new resource_t object.

Definition at line 660 of file wayland-server.hpp.


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