---
name: "wayland_server_shell_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_shell_t"
---

# wayland\_server\_shell\_t(3)

create desktop-style surfaces

## NAME

wayland::server::shell\_t - create desktop-style surfaces

## SYNOPSIS

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

Inherits wayland::server::resource\_t.

### Public Member Functions

std::function\< void(**shell\_surface\_t**, **surface\_t**)\> & **on\_get\_shell\_surface** ()\
 create a shell surface from a surface  void **post\_role** (std::string const &msg)\
 Post error: given wl\_surface has another role.  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

create desktop-style surfaces

This interface is implemented by servers that provide desktop-style user interfaces.

It allows clients to associate a wl\_shell\_surface with a basic surface.

Note! This protocol is deprecated and not intended for production use. For desktop-style user interfaces, use xdg\_shell. Compositors and clients should not implement this interface.

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

## Member Function Documentation

### 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(shell\_surface\_t, surface\_t)\> & shell\_t::on\_get\_shell\_surface ()

create a shell surface from a surface

**Parameters**

*id* shell surface to create \
 *surface* surface to be given the shell surface role

Create a shell surface for an existing surface. This gives the wl\_surface the role of a shell surface. If the wl\_surface already has another role, it raises a protocol error.

Only one shell surface can be associated with a given surface.

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

### void shell\_t::post\_role (std::string const & msg)

Post error: given wl\_surface has another role.

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

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

## Author

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