wayland_server_zxdg_shell_v6_t - Man Page

create desktop-style surfaces

Synopsis

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

Inherits wayland::server::resource_t.

Public Member Functions

std::function< void()> & on_destroy ()
destroy xdg_shell
std::function< void(zxdg_positioner_v6_t)> & on_create_positioner ()
create a positioner object
std::function< void(zxdg_surface_v6_t, surface_t)> & on_get_xdg_surface ()
create a shell surface from a surface
std::function< void(uint32_t)> & on_pong ()
respond to a ping event
void ping (uint32_t serial, bool post=true)
check if the client is alive
void post_role (std::string const &msg)
Post error: given wl_surface has another role.
void post_defunct_surfaces (std::string const &msg)
Post error: xdg_shell was destroyed before children.
void post_not_the_topmost_popup (std::string const &msg)
Post error: the client tried to map or destroy a non-topmost popup.
void post_invalid_popup_parent (std::string const &msg)
Post error: the client specified an invalid popup parent surface.
void post_invalid_surface_state (std::string const &msg)
Post error: the client provided an invalid surface state.
void post_invalid_positioner (std::string const &msg)
Post error: the client provided an invalid positioner.
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 ping_since_version = 1
Minimum protocol version required for the ping function.

Detailed Description

create desktop-style surfaces

xdg_shell allows clients to turn a wl_surface into a 'real window' which can be dragged, resized, stacked, and moved around by the user. Everything about this interface is suited towards traditional desktop environments.

Definition at line 8758 of file wayland-server-protocol-unstable.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(zxdg_positioner_v6_t)> & zxdg_shell_v6_t::on_create_positioner ()

create a positioner object

Parameters

id

Create a positioner object. A positioner object is used to position surfaces relative to some parent surface. See the interface description and xdg_surface.get_popup for details.

Definition at line 8191 of file wayland-server-protocol-unstable.cpp.

std::function< void()> & zxdg_shell_v6_t::on_destroy ()

destroy xdg_shell Destroy this xdg_shell object.

Destroying a bound xdg_shell object while there are surfaces still alive created by this xdg_shell object instance is illegal and will result in a protocol error.

Definition at line 8185 of file wayland-server-protocol-unstable.cpp.

std::function< void(zxdg_surface_v6_t, surface_t)> & zxdg_shell_v6_t::on_get_xdg_surface ()

create a shell surface from a surface

Parameters

id
surface

This creates an xdg_surface for the given surface. While xdg_surface itself is not a role, the corresponding surface may only be assigned a role extending xdg_surface, such as xdg_toplevel or xdg_popup.

This creates an xdg_surface for the given surface. An xdg_surface is used as basis to define a role to a given surface, such as xdg_toplevel or xdg_popup. It also manages functionality shared between xdg_surface based surface roles.

See the documentation of xdg_surface for more details about what an xdg_surface is and how it is used.

Definition at line 8197 of file wayland-server-protocol-unstable.cpp.

std::function< void(uint32_t)> & zxdg_shell_v6_t::on_pong ()

respond to a ping event

Parameters

serial serial of the ping event

A client must respond to a ping event with a pong request or the client may be deemed unresponsive. See xdg_shell.ping.

Definition at line 8203 of file wayland-server-protocol-unstable.cpp.

void zxdg_shell_v6_t::ping (uint32_t serial, bool post = true)

check if the client is alive

Parameters

serial pass this to the pong request

The ping event asks the client if it's still alive. Pass the serial specified in the event back to the compositor by sending a 'pong' request back with the specified serial. See xdg_shell.ping.

Compositors can use this to determine if the client is still alive. It's unspecified what will happen if the client doesn't respond to the ping request, or in what timeframe. Clients should try to respond in a reasonable amount of time.

A compositor is free to ping in any way it wants, but a client must always respond to any xdg_shell object it created.

Definition at line 8209 of file wayland-server-protocol-unstable.cpp.

void zxdg_shell_v6_t::post_defunct_surfaces (std::string const & msg)

Post error: xdg_shell was destroyed before children.

Definition at line 8219 of file wayland-server-protocol-unstable.cpp.

void zxdg_shell_v6_t::post_invalid_popup_parent (std::string const & msg)

Post error: the client specified an invalid popup parent surface.

Definition at line 8229 of file wayland-server-protocol-unstable.cpp.

void zxdg_shell_v6_t::post_invalid_positioner (std::string const & msg)

Post error: the client provided an invalid positioner.

Definition at line 8239 of file wayland-server-protocol-unstable.cpp.

void zxdg_shell_v6_t::post_invalid_surface_state (std::string const & msg)

Post error: the client provided an invalid surface state.

Definition at line 8234 of file wayland-server-protocol-unstable.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 zxdg_shell_v6_t::post_not_the_topmost_popup (std::string const & msg)

Post error: the client tried to map or destroy a non-topmost popup.

Definition at line 8224 of file wayland-server-protocol-unstable.cpp.

void zxdg_shell_v6_t::post_role (std::string const & msg)

Post error: given wl_surface has another role.

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

Member Data Documentation

constexpr std::uint32_t wayland::server::zxdg_shell_v6_t::ping_since_version = 1 [static], [constexpr]

Minimum protocol version required for the ping function.

Definition at line 8856 of file wayland-server-protocol-unstable.hpp.

Author

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

Info

Sat Jan 27 2024 00:00:00 Version 1.0.0 Wayland++