---
name: "wayland_server_global_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_global_t"
---

# wayland\_server\_global\_t(3)

## NAME

wayland::server::global\_t\< resource \>

## SYNOPSIS

`#include <wayland-server.hpp>`

Inherits **wayland::server::global\_base\_t**.

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

*resource* Resource class whose interface shall be used

Definition at line **625** of file **wayland-server.hpp**.

## Constructor & Destructor Documentation

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

*display* Parent display object \
 *version* Interface version

Definition at line **650** of file **wayland-server.hpp**.

## Member Function Documentation

### template\<typename resource \> bool wayland::server::global\_base\_t::has\_interface ()` [inline]`, ` [inherited]`

Check for specific interface.

**Template Parameters**

*resource* Resource class for comparison

**Returns**

true if the global has the same interface as the resource class

Definition at line **614** of file **wayland-server.hpp**.

### 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 **661** of file **wayland-server.hpp**.

## Author

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