Loading...
Searching...
No Matches
wayland-server-protocol.hpp
#pragma once
#include <array>
#include <cstdint>
#include <functional>
#include <memory>
#include <string>
#include <vector>
#include <wayland-server.hpp>
struct wl_registry;
struct wl_callback;
struct wl_compositor;
struct wl_shm_pool;
struct wl_shm;
struct wl_buffer;
struct wl_data_offer;
struct wl_data_source;
struct wl_data_device;
struct wl_data_device_manager;
struct wl_shell;
struct wl_shell_surface;
struct wl_surface;
struct wl_seat;
struct wl_pointer;
struct wl_keyboard;
struct wl_touch;
struct wl_output;
struct wl_region;
struct wl_subcompositor;
struct wl_subsurface;
namespace wayland
{
namespace server
{
class registry_t;
class callback_t;
class compositor_t;
class shm_pool_t;
class shm_t;
enum class shm_error : uint32_t;
enum class shm_format : uint32_t;
class buffer_t;
class data_offer_t;
enum class data_offer_error : uint32_t;
class data_source_t;
enum class data_source_error : uint32_t;
class data_device_t;
enum class data_device_error : uint32_t;
class data_device_manager_t;
struct data_device_manager_dnd_action;
class shell_t;
enum class shell_error : uint32_t;
class shell_surface_t;
struct shell_surface_resize;
struct shell_surface_transient;
enum class shell_surface_fullscreen_method : uint32_t;
class surface_t;
enum class surface_error : uint32_t;
class seat_t;
struct seat_capability;
enum class seat_error : uint32_t;
class pointer_t;
enum class pointer_error : uint32_t;
enum class pointer_button_state : uint32_t;
enum class pointer_axis : uint32_t;
enum class pointer_axis_source : uint32_t;
class keyboard_t;
enum class keyboard_keymap_format : uint32_t;
enum class keyboard_key_state : uint32_t;
class touch_t;
class output_t;
enum class output_subpixel : uint32_t;
struct output_transform;
struct output_mode;
class region_t;
class subcompositor_t;
enum class subcompositor_error : uint32_t;
class subsurface_t;
enum class subsurface_error : uint32_t;
namespace detail
{
extern const wl_interface display_interface;
extern const wl_interface registry_interface;
extern const wl_interface callback_interface;
extern const wl_interface compositor_interface;
extern const wl_interface shm_pool_interface;
extern const wl_interface shm_interface;
extern const wl_interface buffer_interface;
extern const wl_interface data_offer_interface;
extern const wl_interface data_source_interface;
extern const wl_interface data_device_interface;
extern const wl_interface data_device_manager_interface;
extern const wl_interface shell_interface;
extern const wl_interface shell_surface_interface;
extern const wl_interface surface_interface;
extern const wl_interface seat_interface;
extern const wl_interface pointer_interface;
extern const wl_interface keyboard_interface;
extern const wl_interface touch_interface;
extern const wl_interface output_interface;
extern const wl_interface region_interface;
extern const wl_interface subcompositor_interface;
extern const wl_interface subsurface_interface;
}
class registry_t : public resource_t
{
private:
struct events_t : public resource_t::events_base_t
{
std::function<void(uint32_t, resource_t)> bind;
};
static int dispatcher(int opcode, const std::vector<wayland::detail::any>& args, const std::shared_ptr<resource_t::events_base_t>& e);
protected:
static constexpr const wl_interface *interface = &wayland::server::detail::registry_interface;
static constexpr const unsigned int max_version = 1;
friend class global_t<registry_t>;
friend class global_base_t;
public:
registry_t() = default;
registry_t(const client_t& client, uint32_t id, int version = 1);
registry_t(const resource_t &resource);
static const std::string interface_name;
operator wl_registry*() const;
std::function<void(uint32_t, resource_t)> &on_bind();
void global(uint32_t name, std::string const& interface, uint32_t version, bool post = true);
static constexpr std::uint32_t global_since_version = 1;
void global_remove(uint32_t name, bool post = true);
static constexpr std::uint32_t global_remove_since_version = 1;
};
using global_registry_t = global_t<registry_t>;
class callback_t : public resource_t
{
private:
struct events_t : public resource_t::events_base_t
{
};
static int dispatcher(int opcode, const std::vector<wayland::detail::any>& args, const std::shared_ptr<resource_t::events_base_t>& e);
protected:
static constexpr const wl_interface *interface = &wayland::server::detail::callback_interface;
static constexpr const unsigned int max_version = 1;
friend class global_t<callback_t>;
friend class global_base_t;
public:
callback_t() = default;
callback_t(const client_t& client, uint32_t id, int version = 1);
callback_t(const resource_t &resource);
static const std::string interface_name;
operator wl_callback*() const;
void done(uint32_t callback_data, bool post = true);
static constexpr std::uint32_t done_since_version = 1;
};
using global_callback_t = global_t<callback_t>;
class compositor_t : public resource_t
{
private:
struct events_t : public resource_t::events_base_t
{
std::function<void(surface_t)> create_surface;
std::function<void(region_t)> create_region;
};
static int dispatcher(int opcode, const std::vector<wayland::detail::any>& args, const std::shared_ptr<resource_t::events_base_t>& e);
protected:
static constexpr const wl_interface *interface = &wayland::server::detail::compositor_interface;
static constexpr const unsigned int max_version = 5;
friend class global_t<compositor_t>;
friend class global_base_t;
public:
compositor_t() = default;
compositor_t(const client_t& client, uint32_t id, int version = 5);
compositor_t(const resource_t &resource);
static const std::string interface_name;
operator wl_compositor*() const;
std::function<void(surface_t)> &on_create_surface();
std::function<void(region_t)> &on_create_region();
};
using global_compositor_t = global_t<compositor_t>;
class shm_pool_t : public resource_t
{
private:
struct events_t : public resource_t::events_base_t
{
std::function<void(buffer_t, int32_t, int32_t, int32_t, int32_t, shm_format)> create_buffer;
std::function<void()> destroy;
std::function<void(int32_t)> resize;
};
static int dispatcher(int opcode, const std::vector<wayland::detail::any>& args, const std::shared_ptr<resource_t::events_base_t>& e);
protected:
static constexpr const wl_interface *interface = &wayland::server::detail::shm_pool_interface;
static constexpr const unsigned int max_version = 1;
friend class global_t<shm_pool_t>;
friend class global_base_t;
public:
shm_pool_t() = default;
shm_pool_t(const client_t& client, uint32_t id, int version = 1);
shm_pool_t(const resource_t &resource);
static const std::string interface_name;
operator wl_shm_pool*() const;
std::function<void(buffer_t, int32_t, int32_t, int32_t, int32_t, shm_format)> &on_create_buffer();
std::function<void()> &on_destroy();
std::function<void(int32_t)> &on_resize();
};
using global_shm_pool_t = global_t<shm_pool_t>;
class shm_t : public resource_t
{
private:
struct events_t : public resource_t::events_base_t
{
std::function<void(shm_pool_t, int, int32_t)> create_pool;
};
static int dispatcher(int opcode, const std::vector<wayland::detail::any>& args, const std::shared_ptr<resource_t::events_base_t>& e);
protected:
static constexpr const wl_interface *interface = &wayland::server::detail::shm_interface;
static constexpr const unsigned int max_version = 1;
friend class global_t<shm_t>;
friend class global_base_t;
public:
shm_t() = default;
shm_t(const client_t& client, uint32_t id, int version = 1);
shm_t(const resource_t &resource);
static const std::string interface_name;
operator wl_shm*() const;
std::function<void(shm_pool_t, int, int32_t)> &on_create_pool();
void format(shm_format const& format, bool post = true);
static constexpr std::uint32_t format_since_version = 1;
void post_invalid_format(std::string const& msg);
void post_invalid_stride(std::string const& msg);
void post_invalid_fd(std::string const& msg);
};
using global_shm_t = global_t<shm_t>;
enum class shm_error : uint32_t
{
invalid_format = 0,
invalid_stride = 1,
invalid_fd = 2
};
enum class shm_format : uint32_t
{
argb8888 = 0,
xrgb8888 = 1,
c8 = 0x20203843,
rgb332 = 0x38424752,
bgr233 = 0x38524742,
xrgb4444 = 0x32315258,
xbgr4444 = 0x32314258,
rgbx4444 = 0x32315852,
bgrx4444 = 0x32315842,
argb4444 = 0x32315241,
abgr4444 = 0x32314241,
rgba4444 = 0x32314152,
bgra4444 = 0x32314142,
xrgb1555 = 0x35315258,
xbgr1555 = 0x35314258,
rgbx5551 = 0x35315852,
bgrx5551 = 0x35315842,
argb1555 = 0x35315241,
abgr1555 = 0x35314241,
rgba5551 = 0x35314152,
bgra5551 = 0x35314142,
rgb565 = 0x36314752,
bgr565 = 0x36314742,
rgb888 = 0x34324752,
bgr888 = 0x34324742,
xbgr8888 = 0x34324258,
rgbx8888 = 0x34325852,
bgrx8888 = 0x34325842,
abgr8888 = 0x34324241,
rgba8888 = 0x34324152,
bgra8888 = 0x34324142,
xrgb2101010 = 0x30335258,
xbgr2101010 = 0x30334258,
rgbx1010102 = 0x30335852,
bgrx1010102 = 0x30335842,
argb2101010 = 0x30335241,
abgr2101010 = 0x30334241,
rgba1010102 = 0x30334152,
bgra1010102 = 0x30334142,
yuyv = 0x56595559,
yvyu = 0x55595659,
uyvy = 0x59565955,
vyuy = 0x59555956,
ayuv = 0x56555941,
nv12 = 0x3231564e,
nv21 = 0x3132564e,
nv16 = 0x3631564e,
nv61 = 0x3136564e,
yuv410 = 0x39565559,
yvu410 = 0x39555659,
yuv411 = 0x31315559,
yvu411 = 0x31315659,
yuv420 = 0x32315559,
yvu420 = 0x32315659,
yuv422 = 0x36315559,
yvu422 = 0x36315659,
yuv444 = 0x34325559,
yvu444 = 0x34325659,
r8 = 0x20203852,
r16 = 0x20363152,
rg88 = 0x38384752,
gr88 = 0x38385247,
rg1616 = 0x32334752,
gr1616 = 0x32335247,
xrgb16161616f = 0x48345258,
xbgr16161616f = 0x48344258,
argb16161616f = 0x48345241,
abgr16161616f = 0x48344241,
xyuv8888 = 0x56555958,
vuy888 = 0x34325556,
vuy101010 = 0x30335556,
y210 = 0x30313259,
y212 = 0x32313259,
y216 = 0x36313259,
y410 = 0x30313459,
y412 = 0x32313459,
y416 = 0x36313459,
xvyu2101010 = 0x30335658,
xvyu12_16161616 = 0x36335658,
xvyu16161616 = 0x38345658,
y0l0 = 0x304c3059,
x0l0 = 0x304c3058,
y0l2 = 0x324c3059,
x0l2 = 0x324c3058,
yuv420_8bit = 0x38305559,
yuv420_10bit = 0x30315559,
xrgb8888_a8 = 0x38415258,
xbgr8888_a8 = 0x38414258,
rgbx8888_a8 = 0x38415852,
bgrx8888_a8 = 0x38415842,
rgb888_a8 = 0x38413852,
bgr888_a8 = 0x38413842,
rgb565_a8 = 0x38413552,
bgr565_a8 = 0x38413542,
nv24 = 0x3432564e,
nv42 = 0x3234564e,
p210 = 0x30313250,
p010 = 0x30313050,
p012 = 0x32313050,
p016 = 0x36313050,
axbxgxrx106106106106 = 0x30314241,
nv15 = 0x3531564e,
q410 = 0x30313451,
q401 = 0x31303451,
xrgb16161616 = 0x38345258,
xbgr16161616 = 0x38344258,
argb16161616 = 0x38345241,
abgr16161616 = 0x38344241
};
class buffer_t : public resource_t
{
private:
struct events_t : public resource_t::events_base_t
{
std::function<void()> destroy;
};
static int dispatcher(int opcode, const std::vector<wayland::detail::any>& args, const std::shared_ptr<resource_t::events_base_t>& e);
protected:
static constexpr const wl_interface *interface = &wayland::server::detail::buffer_interface;
static constexpr const unsigned int max_version = 1;
friend class global_t<buffer_t>;
friend class global_base_t;
public:
buffer_t() = default;
buffer_t(const client_t& client, uint32_t id, int version = 1);
buffer_t(const resource_t &resource);
static const std::string interface_name;
operator wl_buffer*() const;
std::function<void()> &on_destroy();
void release(bool post = true);
static constexpr std::uint32_t release_since_version = 1;
};
using global_buffer_t = global_t<buffer_t>;
class data_offer_t : public resource_t
{
private:
struct events_t : public resource_t::events_base_t
{
std::function<void(uint32_t, std::string)> accept;
std::function<void(std::string, int)> receive;
std::function<void()> destroy;
std::function<void()> finish;
std::function<void(data_device_manager_dnd_action, data_device_manager_dnd_action)> set_actions;
};
static int dispatcher(int opcode, const std::vector<wayland::detail::any>& args, const std::shared_ptr<resource_t::events_base_t>& e);
protected:
static constexpr const wl_interface *interface = &wayland::server::detail::data_offer_interface;
static constexpr const unsigned int max_version = 3;
friend class global_t<data_offer_t>;
friend class global_base_t;
public:
data_offer_t() = default;
data_offer_t(const client_t& client, uint32_t id, int version = 3);
data_offer_t(const resource_t &resource);
static const std::string interface_name;
operator wl_data_offer*() const;
std::function<void(uint32_t, std::string)> &on_accept();
std::function<void(std::string, int)> &on_receive();
std::function<void()> &on_destroy();
std::function<void()> &on_finish();
std::function<void(data_device_manager_dnd_action, data_device_manager_dnd_action)> &on_set_actions();
void offer(std::string const& mime_type, bool post = true);
static constexpr std::uint32_t offer_since_version = 1;
void source_actions(data_device_manager_dnd_action const& source_actions, bool post = true);
static constexpr std::uint32_t source_actions_since_version = 3;
bool can_source_actions() const;
void action(data_device_manager_dnd_action const& dnd_action, bool post = true);
static constexpr std::uint32_t action_since_version = 3;
bool can_action() const;
void post_invalid_finish(std::string const& msg);
void post_invalid_action_mask(std::string const& msg);
void post_invalid_action(std::string const& msg);
void post_invalid_offer(std::string const& msg);
};
using global_data_offer_t = global_t<data_offer_t>;
enum class data_offer_error : uint32_t
{
invalid_finish = 0,
invalid_action_mask = 1,
invalid_action = 2,
invalid_offer = 3
};
class data_source_t : public resource_t
{
private:
struct events_t : public resource_t::events_base_t
{
std::function<void(std::string)> offer;
std::function<void()> destroy;
std::function<void(data_device_manager_dnd_action)> set_actions;
};
static int dispatcher(int opcode, const std::vector<wayland::detail::any>& args, const std::shared_ptr<resource_t::events_base_t>& e);
protected:
static constexpr const wl_interface *interface = &wayland::server::detail::data_source_interface;
static constexpr const unsigned int max_version = 3;
friend class global_t<data_source_t>;
friend class global_base_t;
public:
data_source_t() = default;
data_source_t(const client_t& client, uint32_t id, int version = 3);
data_source_t(const resource_t &resource);
static const std::string interface_name;
operator wl_data_source*() const;
std::function<void(std::string)> &on_offer();
std::function<void()> &on_destroy();
std::function<void(data_device_manager_dnd_action)> &on_set_actions();
void target(std::string const& mime_type, bool post = true);
static constexpr std::uint32_t target_since_version = 1;
void send(std::string const& mime_type, int fd, bool post = true);
static constexpr std::uint32_t send_since_version = 1;
void cancelled(bool post = true);
static constexpr std::uint32_t cancelled_since_version = 1;
void dnd_drop_performed(bool post = true);
static constexpr std::uint32_t dnd_drop_performed_since_version = 3;
bool can_dnd_drop_performed() const;
void dnd_finished(bool post = true);
static constexpr std::uint32_t dnd_finished_since_version = 3;
bool can_dnd_finished() const;
void action(data_device_manager_dnd_action const& dnd_action, bool post = true);
static constexpr std::uint32_t action_since_version = 3;
bool can_action() const;
void post_invalid_action_mask(std::string const& msg);
void post_invalid_source(std::string const& msg);
};
using global_data_source_t = global_t<data_source_t>;
enum class data_source_error : uint32_t
{
invalid_action_mask = 0,
invalid_source = 1
};
class data_device_t : public resource_t
{
private:
struct events_t : public resource_t::events_base_t
{
std::function<void(data_source_t, surface_t, surface_t, uint32_t)> start_drag;
std::function<void(data_source_t, uint32_t)> set_selection;
std::function<void()> release;
};
static int dispatcher(int opcode, const std::vector<wayland::detail::any>& args, const std::shared_ptr<resource_t::events_base_t>& e);
protected:
static constexpr const wl_interface *interface = &wayland::server::detail::data_device_interface;
static constexpr const unsigned int max_version = 3;
friend class global_t<data_device_t>;
friend class global_base_t;
public:
data_device_t() = default;
data_device_t(const client_t& client, uint32_t id, int version = 3);
data_device_t(const resource_t &resource);
static const std::string interface_name;
operator wl_data_device*() const;
std::function<void(data_source_t, surface_t, surface_t, uint32_t)> &on_start_drag();
std::function<void(data_source_t, uint32_t)> &on_set_selection();
std::function<void()> &on_release();
void data_offer(bool post = true);
static constexpr std::uint32_t data_offer_since_version = 1;
void enter(uint32_t serial, surface_t const& surface, double x, double y, data_offer_t const& id, bool post = true);
static constexpr std::uint32_t enter_since_version = 1;
void leave(bool post = true);
static constexpr std::uint32_t leave_since_version = 1;
void motion(uint32_t time, double x, double y, bool post = true);
static constexpr std::uint32_t motion_since_version = 1;
void drop(bool post = true);
static constexpr std::uint32_t drop_since_version = 1;
void selection(data_offer_t const& id, bool post = true);
static constexpr std::uint32_t selection_since_version = 1;
void post_role(std::string const& msg);
};
using global_data_device_t = global_t<data_device_t>;
enum class data_device_error : uint32_t
{
role = 0
};
class data_device_manager_t : public resource_t
{
private:
struct events_t : public resource_t::events_base_t
{
std::function<void(data_source_t)> create_data_source;
std::function<void(data_device_t, seat_t)> get_data_device;
};
static int dispatcher(int opcode, const std::vector<wayland::detail::any>& args, const std::shared_ptr<resource_t::events_base_t>& e);
protected:
static constexpr const wl_interface *interface = &wayland::server::detail::data_device_manager_interface;
static constexpr const unsigned int max_version = 3;
friend class global_t<data_device_manager_t>;
friend class global_base_t;
public:
data_device_manager_t() = default;
data_device_manager_t(const client_t& client, uint32_t id, int version = 3);
data_device_manager_t(const resource_t &resource);
static const std::string interface_name;
operator wl_data_device_manager*() const;
std::function<void(data_source_t)> &on_create_data_source();
std::function<void(data_device_t, seat_t)> &on_get_data_device();
};
using global_data_device_manager_t = global_t<data_device_manager_t>;
struct data_device_manager_dnd_action : public wayland::detail::bitfield<3, 6>
{
data_device_manager_dnd_action(const wayland::detail::bitfield<3, 6> &b)
: wayland::detail::bitfield<3, 6>(b) {}
data_device_manager_dnd_action(const uint32_t value)
: wayland::detail::bitfield<3, 6>(value) {}
static const wayland::detail::bitfield<3, 6> none;
static const wayland::detail::bitfield<3, 6> copy;
static const wayland::detail::bitfield<3, 6> move;
static const wayland::detail::bitfield<3, 6> ask;
};
class shell_t : public resource_t
{
private:
struct events_t : public resource_t::events_base_t
{
std::function<void(shell_surface_t, surface_t)> get_shell_surface;
};
static int dispatcher(int opcode, const std::vector<wayland::detail::any>& args, const std::shared_ptr<resource_t::events_base_t>& e);
protected:
static constexpr const wl_interface *interface = &wayland::server::detail::shell_interface;
static constexpr const unsigned int max_version = 1;
friend class global_t<shell_t>;
friend class global_base_t;
public:
shell_t() = default;
shell_t(const client_t& client, uint32_t id, int version = 1);
shell_t(const resource_t &resource);
static const std::string interface_name;
operator wl_shell*() const;
std::function<void(shell_surface_t, surface_t)> &on_get_shell_surface();
void post_role(std::string const& msg);
};
using global_shell_t = global_t<shell_t>;
enum class shell_error : uint32_t
{
role = 0
};
class shell_surface_t : public resource_t
{
private:
struct events_t : public resource_t::events_base_t
{
std::function<void(uint32_t)> pong;
std::function<void(seat_t, uint32_t)> move;
std::function<void(seat_t, uint32_t, shell_surface_resize)> resize;
std::function<void()> set_toplevel;
std::function<void(surface_t, int32_t, int32_t, shell_surface_transient)> set_transient;
std::function<void(shell_surface_fullscreen_method, uint32_t, output_t)> set_fullscreen;
std::function<void(seat_t, uint32_t, surface_t, int32_t, int32_t, shell_surface_transient)> set_popup;
std::function<void(output_t)> set_maximized;
std::function<void(std::string)> set_title;
std::function<void(std::string)> set_class;
};
static int dispatcher(int opcode, const std::vector<wayland::detail::any>& args, const std::shared_ptr<resource_t::events_base_t>& e);
protected:
static constexpr const wl_interface *interface = &wayland::server::detail::shell_surface_interface;
static constexpr const unsigned int max_version = 1;
friend class global_t<shell_surface_t>;
friend class global_base_t;
public:
shell_surface_t() = default;
shell_surface_t(const client_t& client, uint32_t id, int version = 1);
shell_surface_t(const resource_t &resource);
static const std::string interface_name;
operator wl_shell_surface*() const;
std::function<void(uint32_t)> &on_pong();
std::function<void(seat_t, uint32_t)> &on_move();
std::function<void(seat_t, uint32_t, shell_surface_resize)> &on_resize();
std::function<void()> &on_set_toplevel();
std::function<void(surface_t, int32_t, int32_t, shell_surface_transient)> &on_set_transient();
std::function<void(shell_surface_fullscreen_method, uint32_t, output_t)> &on_set_fullscreen();
std::function<void(seat_t, uint32_t, surface_t, int32_t, int32_t, shell_surface_transient)> &on_set_popup();
std::function<void(output_t)> &on_set_maximized();
std::function<void(std::string)> &on_set_title();
std::function<void(std::string)> &on_set_class();
void ping(uint32_t serial, bool post = true);
static constexpr std::uint32_t ping_since_version = 1;
void configure(shell_surface_resize const& edges, int32_t width, int32_t height, bool post = true);
static constexpr std::uint32_t configure_since_version = 1;
void popup_done(bool post = true);
static constexpr std::uint32_t popup_done_since_version = 1;
};
using global_shell_surface_t = global_t<shell_surface_t>;
struct shell_surface_resize : public wayland::detail::bitfield<4, 8>
{
shell_surface_resize(const wayland::detail::bitfield<4, 8> &b)
: wayland::detail::bitfield<4, 8>(b) {}
shell_surface_resize(const uint32_t value)
: wayland::detail::bitfield<4, 8>(value) {}
static const wayland::detail::bitfield<4, 8> none;
static const wayland::detail::bitfield<4, 8> top;
static const wayland::detail::bitfield<4, 8> bottom;
static const wayland::detail::bitfield<4, 8> left;
static const wayland::detail::bitfield<4, 8> top_left;
static const wayland::detail::bitfield<4, 8> bottom_left;
static const wayland::detail::bitfield<4, 8> right;
static const wayland::detail::bitfield<4, 8> top_right;
static const wayland::detail::bitfield<4, 8> bottom_right;
};
struct shell_surface_transient : public wayland::detail::bitfield<1, 9>
{
shell_surface_transient(const wayland::detail::bitfield<1, 9> &b)
: wayland::detail::bitfield<1, 9>(b) {}
shell_surface_transient(const uint32_t value)
: wayland::detail::bitfield<1, 9>(value) {}
static const wayland::detail::bitfield<1, 9> inactive;
};
enum class shell_surface_fullscreen_method : uint32_t
{
_default = 0,
scale = 1,
driver = 2,
fill = 3
};
class surface_t : public resource_t
{
private:
struct events_t : public resource_t::events_base_t
{
std::function<void()> destroy;
std::function<void(buffer_t, int32_t, int32_t)> attach;
std::function<void(int32_t, int32_t, int32_t, int32_t)> damage;
std::function<void(callback_t)> frame;
std::function<void(region_t)> set_opaque_region;
std::function<void(region_t)> set_input_region;
std::function<void()> commit;
std::function<void(output_transform)> set_buffer_transform;
std::function<void(int32_t)> set_buffer_scale;
std::function<void(int32_t, int32_t, int32_t, int32_t)> damage_buffer;
std::function<void(int32_t, int32_t)> offset;
};
static int dispatcher(int opcode, const std::vector<wayland::detail::any>& args, const std::shared_ptr<resource_t::events_base_t>& e);
protected:
static constexpr const wl_interface *interface = &wayland::server::detail::surface_interface;
static constexpr const unsigned int max_version = 5;
friend class global_t<surface_t>;
friend class global_base_t;
public:
surface_t() = default;
surface_t(const client_t& client, uint32_t id, int version = 5);
surface_t(const resource_t &resource);
static const std::string interface_name;
operator wl_surface*() const;
std::function<void()> &on_destroy();
std::function<void(buffer_t, int32_t, int32_t)> &on_attach();
std::function<void(int32_t, int32_t, int32_t, int32_t)> &on_damage();
std::function<void(callback_t)> &on_frame();
std::function<void(region_t)> &on_set_opaque_region();
std::function<void(region_t)> &on_set_input_region();
std::function<void()> &on_commit();
std::function<void(output_transform)> &on_set_buffer_transform();
std::function<void(int32_t)> &on_set_buffer_scale();
std::function<void(int32_t, int32_t, int32_t, int32_t)> &on_damage_buffer();
std::function<void(int32_t, int32_t)> &on_offset();
void enter(output_t const& output, bool post = true);
static constexpr std::uint32_t enter_since_version = 1;
void leave(output_t const& output, bool post = true);
static constexpr std::uint32_t leave_since_version = 1;
void post_invalid_scale(std::string const& msg);
void post_invalid_transform(std::string const& msg);
void post_invalid_size(std::string const& msg);
void post_invalid_offset(std::string const& msg);
};
using global_surface_t = global_t<surface_t>;
enum class surface_error : uint32_t
{
invalid_scale = 0,
invalid_transform = 1,
invalid_size = 2,
invalid_offset = 3
};
class seat_t : public resource_t
{
private:
struct events_t : public resource_t::events_base_t
{
std::function<void(pointer_t)> get_pointer;
std::function<void(keyboard_t)> get_keyboard;
std::function<void(touch_t)> get_touch;
std::function<void()> release;
};
static int dispatcher(int opcode, const std::vector<wayland::detail::any>& args, const std::shared_ptr<resource_t::events_base_t>& e);
protected:
static constexpr const wl_interface *interface = &wayland::server::detail::seat_interface;
static constexpr const unsigned int max_version = 8;
friend class global_t<seat_t>;
friend class global_base_t;
public:
seat_t() = default;
seat_t(const client_t& client, uint32_t id, int version = 8);
seat_t(const resource_t &resource);
static const std::string interface_name;
operator wl_seat*() const;
std::function<void(pointer_t)> &on_get_pointer();
std::function<void(keyboard_t)> &on_get_keyboard();
std::function<void(touch_t)> &on_get_touch();
std::function<void()> &on_release();
void capabilities(seat_capability const& capabilities, bool post = true);
static constexpr std::uint32_t capabilities_since_version = 1;
void name(std::string const& name, bool post = true);
static constexpr std::uint32_t name_since_version = 2;
bool can_name() const;
void post_missing_capability(std::string const& msg);
};
using global_seat_t = global_t<seat_t>;
struct seat_capability : public wayland::detail::bitfield<3, 12>
{
seat_capability(const wayland::detail::bitfield<3, 12> &b)
: wayland::detail::bitfield<3, 12>(b) {}
seat_capability(const uint32_t value)
: wayland::detail::bitfield<3, 12>(value) {}
static const wayland::detail::bitfield<3, 12> pointer;
static const wayland::detail::bitfield<3, 12> keyboard;
static const wayland::detail::bitfield<3, 12> touch;
};
enum class seat_error : uint32_t
{
missing_capability = 0
};
class pointer_t : public resource_t
{
private:
struct events_t : public resource_t::events_base_t
{
std::function<void(uint32_t, surface_t, int32_t, int32_t)> set_cursor;
std::function<void()> release;
};
static int dispatcher(int opcode, const std::vector<wayland::detail::any>& args, const std::shared_ptr<resource_t::events_base_t>& e);
protected:
static constexpr const wl_interface *interface = &wayland::server::detail::pointer_interface;
static constexpr const unsigned int max_version = 8;
friend class global_t<pointer_t>;
friend class global_base_t;
public:
pointer_t() = default;
pointer_t(const client_t& client, uint32_t id, int version = 8);
pointer_t(const resource_t &resource);
static const std::string interface_name;
operator wl_pointer*() const;
std::function<void(uint32_t, surface_t, int32_t, int32_t)> &on_set_cursor();
std::function<void()> &on_release();
void enter(uint32_t serial, surface_t const& surface, double surface_x, double surface_y, bool post = true);
static constexpr std::uint32_t enter_since_version = 1;
void leave(uint32_t serial, surface_t const& surface, bool post = true);
static constexpr std::uint32_t leave_since_version = 1;
void motion(uint32_t time, double surface_x, double surface_y, bool post = true);
static constexpr std::uint32_t motion_since_version = 1;
void button(uint32_t serial, uint32_t time, uint32_t button, pointer_button_state const& state, bool post = true);
static constexpr std::uint32_t button_since_version = 1;
void axis(uint32_t time, pointer_axis const& axis, double value, bool post = true);
static constexpr std::uint32_t axis_since_version = 1;
void frame(bool post = true);
static constexpr std::uint32_t frame_since_version = 5;
bool can_frame() const;
void axis_source(pointer_axis_source const& axis_source, bool post = true);
static constexpr std::uint32_t axis_source_since_version = 5;
bool can_axis_source() const;
void axis_stop(uint32_t time, pointer_axis const& axis, bool post = true);
static constexpr std::uint32_t axis_stop_since_version = 5;
bool can_axis_stop() const;
void axis_discrete(pointer_axis const& axis, int32_t discrete, bool post = true);
static constexpr std::uint32_t axis_discrete_since_version = 5;
bool can_axis_discrete() const;
void axis_value120(pointer_axis const& axis, int32_t value120, bool post = true);
static constexpr std::uint32_t axis_value120_since_version = 8;
bool can_axis_value120() const;
void post_role(std::string const& msg);
};
using global_pointer_t = global_t<pointer_t>;
enum class pointer_error : uint32_t
{
role = 0
};
enum class pointer_button_state : uint32_t
{
released = 0,
pressed = 1
};
enum class pointer_axis : uint32_t
{
vertical_scroll = 0,
horizontal_scroll = 1
};
enum class pointer_axis_source : uint32_t
{
wheel = 0,
finger = 1,
continuous = 2,
wheel_tilt = 3
};
class keyboard_t : public resource_t
{
private:
struct events_t : public resource_t::events_base_t
{
std::function<void()> release;
};
static int dispatcher(int opcode, const std::vector<wayland::detail::any>& args, const std::shared_ptr<resource_t::events_base_t>& e);
protected:
static constexpr const wl_interface *interface = &wayland::server::detail::keyboard_interface;
static constexpr const unsigned int max_version = 8;
friend class global_t<keyboard_t>;
friend class global_base_t;
public:
keyboard_t() = default;
keyboard_t(const client_t& client, uint32_t id, int version = 8);
keyboard_t(const resource_t &resource);
static const std::string interface_name;
operator wl_keyboard*() const;
std::function<void()> &on_release();
void keymap(keyboard_keymap_format const& format, int fd, uint32_t size, bool post = true);
static constexpr std::uint32_t keymap_since_version = 1;
void enter(uint32_t serial, surface_t const& surface, array_t const& keys, bool post = true);
static constexpr std::uint32_t enter_since_version = 1;
void leave(uint32_t serial, surface_t const& surface, bool post = true);
static constexpr std::uint32_t leave_since_version = 1;
void key(uint32_t serial, uint32_t time, uint32_t key, keyboard_key_state const& state, bool post = true);
static constexpr std::uint32_t key_since_version = 1;
void modifiers(uint32_t serial, uint32_t mods_depressed, uint32_t mods_latched, uint32_t mods_locked, uint32_t group, bool post = true);
static constexpr std::uint32_t modifiers_since_version = 1;
void repeat_info(int32_t rate, int32_t delay, bool post = true);
static constexpr std::uint32_t repeat_info_since_version = 4;
bool can_repeat_info() const;
};
using global_keyboard_t = global_t<keyboard_t>;
enum class keyboard_keymap_format : uint32_t
{
no_keymap = 0,
xkb_v1 = 1
};
enum class keyboard_key_state : uint32_t
{
released = 0,
pressed = 1
};
class touch_t : public resource_t
{
private:
struct events_t : public resource_t::events_base_t
{
std::function<void()> release;
};
static int dispatcher(int opcode, const std::vector<wayland::detail::any>& args, const std::shared_ptr<resource_t::events_base_t>& e);
protected:
static constexpr const wl_interface *interface = &wayland::server::detail::touch_interface;
static constexpr const unsigned int max_version = 8;
friend class global_t<touch_t>;
friend class global_base_t;
public:
touch_t() = default;
touch_t(const client_t& client, uint32_t id, int version = 8);
touch_t(const resource_t &resource);
static const std::string interface_name;
operator wl_touch*() const;
std::function<void()> &on_release();
void down(uint32_t serial, uint32_t time, surface_t const& surface, int32_t id, double x, double y, bool post = true);
static constexpr std::uint32_t down_since_version = 1;
void up(uint32_t serial, uint32_t time, int32_t id, bool post = true);
static constexpr std::uint32_t up_since_version = 1;
void motion(uint32_t time, int32_t id, double x, double y, bool post = true);
static constexpr std::uint32_t motion_since_version = 1;
void frame(bool post = true);
static constexpr std::uint32_t frame_since_version = 1;
void cancel(bool post = true);
static constexpr std::uint32_t cancel_since_version = 1;
void shape(int32_t id, double major, double minor, bool post = true);
static constexpr std::uint32_t shape_since_version = 6;
bool can_shape() const;
void orientation(int32_t id, double orientation, bool post = true);
static constexpr std::uint32_t orientation_since_version = 6;
bool can_orientation() const;
};
using global_touch_t = global_t<touch_t>;
class output_t : public resource_t
{
private:
struct events_t : public resource_t::events_base_t
{
std::function<void()> release;
};
static int dispatcher(int opcode, const std::vector<wayland::detail::any>& args, const std::shared_ptr<resource_t::events_base_t>& e);
protected:
static constexpr const wl_interface *interface = &wayland::server::detail::output_interface;
static constexpr const unsigned int max_version = 4;
friend class global_t<output_t>;
friend class global_base_t;
public:
output_t() = default;
output_t(const client_t& client, uint32_t id, int version = 4);
output_t(const resource_t &resource);
static const std::string interface_name;
operator wl_output*() const;
std::function<void()> &on_release();
void geometry(int32_t x, int32_t y, int32_t physical_width, int32_t physical_height, output_subpixel const& subpixel, std::string const& make, std::string const& model, output_transform const& transform, bool post = true);
static constexpr std::uint32_t geometry_since_version = 1;
void mode(output_mode const& flags, int32_t width, int32_t height, int32_t refresh, bool post = true);
static constexpr std::uint32_t mode_since_version = 1;
void done(bool post = true);
static constexpr std::uint32_t done_since_version = 2;
bool can_done() const;
void scale(int32_t factor, bool post = true);
static constexpr std::uint32_t scale_since_version = 2;
bool can_scale() const;
void name(std::string const& name, bool post = true);
static constexpr std::uint32_t name_since_version = 4;
bool can_name() const;
void description(std::string const& description, bool post = true);
static constexpr std::uint32_t description_since_version = 4;
bool can_description() const;
};
using global_output_t = global_t<output_t>;
enum class output_subpixel : uint32_t
{
unknown = 0,
none = 1,
horizontal_rgb = 2,
horizontal_bgr = 3,
vertical_rgb = 4,
vertical_bgr = 5
};
struct output_transform : public wayland::detail::bitfield<3, 21>
{
output_transform(const wayland::detail::bitfield<3, 21> &b)
: wayland::detail::bitfield<3, 21>(b) {}
output_transform(const uint32_t value)
: wayland::detail::bitfield<3, 21>(value) {}
static const wayland::detail::bitfield<3, 21> normal;
static const wayland::detail::bitfield<3, 21> _90;
static const wayland::detail::bitfield<3, 21> _180;
static const wayland::detail::bitfield<3, 21> _270;
static const wayland::detail::bitfield<3, 21> flipped;
static const wayland::detail::bitfield<3, 21> flipped_90;
static const wayland::detail::bitfield<3, 21> flipped_180;
static const wayland::detail::bitfield<3, 21> flipped_270;
};
struct output_mode : public wayland::detail::bitfield<2, 22>
{
output_mode(const wayland::detail::bitfield<2, 22> &b)
: wayland::detail::bitfield<2, 22>(b) {}
output_mode(const uint32_t value)
: wayland::detail::bitfield<2, 22>(value) {}
static const wayland::detail::bitfield<2, 22> current;
static const wayland::detail::bitfield<2, 22> preferred;
};
class region_t : public resource_t
{
private:
struct events_t : public resource_t::events_base_t
{
std::function<void()> destroy;
std::function<void(int32_t, int32_t, int32_t, int32_t)> add;
std::function<void(int32_t, int32_t, int32_t, int32_t)> subtract;
};
static int dispatcher(int opcode, const std::vector<wayland::detail::any>& args, const std::shared_ptr<resource_t::events_base_t>& e);
protected:
static constexpr const wl_interface *interface = &wayland::server::detail::region_interface;
static constexpr const unsigned int max_version = 1;
friend class global_t<region_t>;
friend class global_base_t;
public:
region_t() = default;
region_t(const client_t& client, uint32_t id, int version = 1);
region_t(const resource_t &resource);
static const std::string interface_name;
operator wl_region*() const;
std::function<void()> &on_destroy();
std::function<void(int32_t, int32_t, int32_t, int32_t)> &on_add();
std::function<void(int32_t, int32_t, int32_t, int32_t)> &on_subtract();
};
using global_region_t = global_t<region_t>;
class subcompositor_t : public resource_t
{
private:
struct events_t : public resource_t::events_base_t
{
std::function<void()> destroy;
std::function<void(subsurface_t, surface_t, surface_t)> get_subsurface;
};
static int dispatcher(int opcode, const std::vector<wayland::detail::any>& args, const std::shared_ptr<resource_t::events_base_t>& e);
protected:
static constexpr const wl_interface *interface = &wayland::server::detail::subcompositor_interface;
static constexpr const unsigned int max_version = 1;
friend class global_t<subcompositor_t>;
friend class global_base_t;
public:
subcompositor_t() = default;
subcompositor_t(const client_t& client, uint32_t id, int version = 1);
subcompositor_t(const resource_t &resource);
static const std::string interface_name;
operator wl_subcompositor*() const;
std::function<void()> &on_destroy();
std::function<void(subsurface_t, surface_t, surface_t)> &on_get_subsurface();
void post_bad_surface(std::string const& msg);
};
using global_subcompositor_t = global_t<subcompositor_t>;
enum class subcompositor_error : uint32_t
{
bad_surface = 0
};
class subsurface_t : public resource_t
{
private:
struct events_t : public resource_t::events_base_t
{
std::function<void()> destroy;
std::function<void(int32_t, int32_t)> set_position;
std::function<void(surface_t)> place_above;
std::function<void(surface_t)> place_below;
std::function<void()> set_sync;
std::function<void()> set_desync;
};
static int dispatcher(int opcode, const std::vector<wayland::detail::any>& args, const std::shared_ptr<resource_t::events_base_t>& e);
protected:
static constexpr const wl_interface *interface = &wayland::server::detail::subsurface_interface;
static constexpr const unsigned int max_version = 1;
friend class global_t<subsurface_t>;
friend class global_base_t;
public:
subsurface_t() = default;
subsurface_t(const client_t& client, uint32_t id, int version = 1);
subsurface_t(const resource_t &resource);
static const std::string interface_name;
operator wl_subsurface*() const;
std::function<void()> &on_destroy();
std::function<void(int32_t, int32_t)> &on_set_position();
std::function<void(surface_t)> &on_place_above();
std::function<void(surface_t)> &on_place_below();
std::function<void()> &on_set_sync();
std::function<void()> &on_set_desync();
void post_bad_surface(std::string const& msg);
};
using global_subsurface_t = global_t<subsurface_t>;
enum class subsurface_error : uint32_t
{
bad_surface = 0
};
}
}
wayland::server::buffer_t
content for a wl_surface
Definition wayland-server-protocol.hpp:750
wayland::server::buffer_t::release_since_version
static constexpr std::uint32_t release_since_version
Minimum protocol version required for the release function.
Definition wayland-server-protocol.hpp:805
wayland::server::buffer_t::release
void release(bool post=true)
compositor releases buffer
Definition wayland-server-protocol.cpp:1812
wayland::server::buffer_t::on_destroy
std::function< void()> & on_destroy()
destroy a buffer
Definition wayland-server-protocol.cpp:1806
wayland::server::callback_t
callback object
Definition wayland-server-protocol.hpp:221
wayland::server::callback_t::done_since_version
static constexpr std::uint32_t done_since_version
Minimum protocol version required for the done function.
Definition wayland-server-protocol.hpp:255
wayland::server::callback_t::done
void done(uint32_t callback_data, bool post=true)
done event
Definition wayland-server-protocol.cpp:1617
wayland::server::compositor_t
the compositor singleton
Definition wayland-server-protocol.hpp:270
wayland::server::compositor_t::on_create_surface
std::function< void(surface_t)> & on_create_surface()
create new surface
Definition wayland-server-protocol.cpp:1646
wayland::server::compositor_t::on_create_region
std::function< void(region_t)> & on_create_region()
create new region
Definition wayland-server-protocol.cpp:1652
wayland::server::data_device_manager_t
data transfer interface
Definition wayland-server-protocol.hpp:1565
wayland::server::data_device_manager_t::on_get_data_device
std::function< void(data_device_t, seat_t)> & on_get_data_device()
create a new data device
Definition wayland-server-protocol.cpp:2175
wayland::server::data_device_manager_t::on_create_data_source
std::function< void(data_source_t)> & on_create_data_source()
create a new data source
Definition wayland-server-protocol.cpp:2169
wayland::server::data_device_t
data transfer device
Definition wayland-server-protocol.hpp:1335
wayland::server::data_device_t::enter_since_version
static constexpr std::uint32_t enter_since_version
Minimum protocol version required for the enter function.
Definition wayland-server-protocol.hpp:1454
wayland::server::data_device_t::post_role
void post_role(std::string const &msg)
Post error: given wl_surface has another role.
Definition wayland-server-protocol.cpp:2126
wayland::server::data_device_t::on_set_selection
std::function< void(data_source_t, uint32_t)> & on_set_selection()
copy data to the selection
Definition wayland-server-protocol.cpp:2084
wayland::server::data_device_t::drop_since_version
static constexpr std::uint32_t drop_since_version
Minimum protocol version required for the drop function.
Definition wayland-server-protocol.hpp:1507
wayland::server::data_device_t::selection_since_version
static constexpr std::uint32_t selection_since_version
Minimum protocol version required for the selection function.
Definition wayland-server-protocol.hpp:1530
wayland::server::data_device_t::on_release
std::function< void()> & on_release()
destroy data device
Definition wayland-server-protocol.cpp:2090
wayland::server::data_device_t::motion_since_version
static constexpr std::uint32_t motion_since_version
Minimum protocol version required for the motion function.
Definition wayland-server-protocol.hpp:1484
wayland::server::data_device_t::enter
void enter(uint32_t serial, surface_t const &surface, double x, double y, data_offer_t const &id, bool post=true)
initiate drag-and-drop session
Definition wayland-server-protocol.cpp:2101
wayland::server::data_device_t::leave_since_version
static constexpr std::uint32_t leave_since_version
Minimum protocol version required for the leave function.
Definition wayland-server-protocol.hpp:1467
wayland::server::data_device_t::leave
void leave(bool post=true)
end drag-and-drop session
Definition wayland-server-protocol.cpp:2106
wayland::server::data_device_t::data_offer
void data_offer(bool post=true)
introduce a new wl_data_offer
Definition wayland-server-protocol.cpp:2096
wayland::server::data_device_t::motion
void motion(uint32_t time, double x, double y, bool post=true)
drag-and-drop session motion
Definition wayland-server-protocol.cpp:2111
wayland::server::data_device_t::data_offer_since_version
static constexpr std::uint32_t data_offer_since_version
Minimum protocol version required for the data_offer function.
Definition wayland-server-protocol.hpp:1435
wayland::server::data_device_t::on_start_drag
std::function< void(data_source_t, surface_t, surface_t, uint32_t)> & on_start_drag()
start drag-and-drop operation
Definition wayland-server-protocol.cpp:2078
wayland::server::data_device_t::drop
void drop(bool post=true)
end drag-and-drop session successfully
Definition wayland-server-protocol.cpp:2116
wayland::server::data_device_t::selection
void selection(data_offer_t const &id, bool post=true)
advertise new selection
Definition wayland-server-protocol.cpp:2121
wayland::server::data_offer_t
offer to transfer data
Definition wayland-server-protocol.hpp:823
wayland::server::data_offer_t::offer
void offer(std::string const &mime_type, bool post=true)
advertise offered mime type
Definition wayland-server-protocol.cpp:1878
wayland::server::data_offer_t::on_destroy
std::function< void()> & on_destroy()
destroy data offer
Definition wayland-server-protocol.cpp:1860
wayland::server::data_offer_t::on_receive
std::function< void(std::string, int)> & on_receive()
request that the data is transferred
Definition wayland-server-protocol.cpp:1854
wayland::server::data_offer_t::on_set_actions
std::function< void(data_device_manager_dnd_action, data_device_manager_dnd_action)> & on_set_actions()
set the available/preferred drag-and-drop actions
Definition wayland-server-protocol.cpp:1872
wayland::server::data_offer_t::source_actions
void source_actions(data_device_manager_dnd_action const &source_actions, bool post=true)
notify the source-side available actions
Definition wayland-server-protocol.cpp:1883
wayland::server::data_offer_t::on_accept
std::function< void(uint32_t, std::string)> & on_accept()
accept one of the offered mime types
Definition wayland-server-protocol.cpp:1848
wayland::server::data_offer_t::post_invalid_finish
void post_invalid_finish(std::string const &msg)
Post error: finish request was called untimely.
Definition wayland-server-protocol.cpp:1903
wayland::server::data_offer_t::can_source_actions
bool can_source_actions() const
Check whether the source_actions function is available with the currently bound version of the protoc...
Definition wayland-server-protocol.cpp:1888
wayland::server::data_offer_t::can_action
bool can_action() const
Check whether the action function is available with the currently bound version of the protocol.
Definition wayland-server-protocol.cpp:1898
wayland::server::data_offer_t::on_finish
std::function< void()> & on_finish()
the offer will no longer be used
Definition wayland-server-protocol.cpp:1866
wayland::server::data_offer_t::offer_since_version
static constexpr std::uint32_t offer_since_version
Minimum protocol version required for the offer function.
Definition wayland-server-protocol.hpp:974
wayland::server::data_offer_t::source_actions_since_version
static constexpr std::uint32_t source_actions_since_version
Minimum protocol version required for the source_actions function.
Definition wayland-server-protocol.hpp:988
wayland::server::data_offer_t::post_invalid_action
void post_invalid_action(std::string const &msg)
Post error: action argument has an invalid value.
Definition wayland-server-protocol.cpp:1913
wayland::server::data_offer_t::action_since_version
static constexpr std::uint32_t action_since_version
Minimum protocol version required for the action function.
Definition wayland-server-protocol.hpp:1039
wayland::server::data_offer_t::post_invalid_offer
void post_invalid_offer(std::string const &msg)
Post error: offer doesn't accept this request.
Definition wayland-server-protocol.cpp:1918
wayland::server::data_offer_t::post_invalid_action_mask
void post_invalid_action_mask(std::string const &msg)
Post error: action mask contains invalid values.
Definition wayland-server-protocol.cpp:1908
wayland::server::data_offer_t::action
void action(data_device_manager_dnd_action const &dnd_action, bool post=true)
notify the selected action
Definition wayland-server-protocol.cpp:1893
wayland::server::data_source_t
offer to transfer data
Definition wayland-server-protocol.hpp:1091
wayland::server::data_source_t::cancelled
void cancelled(bool post=true)
selection was cancelled
Definition wayland-server-protocol.cpp:1995
wayland::server::data_source_t::send_since_version
static constexpr std::uint32_t send_since_version
Minimum protocol version required for the send function.
Definition wayland-server-protocol.hpp:1183
wayland::server::data_source_t::dnd_drop_performed_since_version
static constexpr std::uint32_t dnd_drop_performed_since_version
Minimum protocol version required for the dnd_drop_performed function.
Definition wayland-server-protocol.hpp:1232
wayland::server::data_source_t::dnd_drop_performed
void dnd_drop_performed(bool post=true)
the drag-and-drop operation physically finished
Definition wayland-server-protocol.cpp:2000
wayland::server::data_source_t::post_invalid_action_mask
void post_invalid_action_mask(std::string const &msg)
Post error: action mask contains invalid values.
Definition wayland-server-protocol.cpp:2030
wayland::server::data_source_t::dnd_finished_since_version
static constexpr std::uint32_t dnd_finished_since_version
Minimum protocol version required for the dnd_finished function.
Definition wayland-server-protocol.hpp:1253
wayland::server::data_source_t::can_dnd_drop_performed
bool can_dnd_drop_performed() const
Check whether the dnd_drop_performed function is available with the currently bound version of the pr...
Definition wayland-server-protocol.cpp:2005
wayland::server::data_source_t::can_action
bool can_action() const
Check whether the action function is available with the currently bound version of the protocol.
Definition wayland-server-protocol.cpp:2025
wayland::server::data_source_t::on_set_actions
std::function< void(data_device_manager_dnd_action)> & on_set_actions()
set the available drag-and-drop actions
Definition wayland-server-protocol.cpp:1979
wayland::server::data_source_t::on_offer
std::function< void(std::string)> & on_offer()
add an offered mime type
Definition wayland-server-protocol.cpp:1967
wayland::server::data_source_t::on_destroy
std::function< void()> & on_destroy()
destroy the data source
Definition wayland-server-protocol.cpp:1973
wayland::server::data_source_t::action_since_version
static constexpr std::uint32_t action_since_version
Minimum protocol version required for the action function.
Definition wayland-server-protocol.hpp:1294
wayland::server::data_source_t::send
void send(std::string const &mime_type, int fd, bool post=true)
send the data
Definition wayland-server-protocol.cpp:1990
wayland::server::data_source_t::can_dnd_finished
bool can_dnd_finished() const
Check whether the dnd_finished function is available with the currently bound version of the protocol...
Definition wayland-server-protocol.cpp:2015
wayland::server::data_source_t::action
void action(data_device_manager_dnd_action const &dnd_action, bool post=true)
notify the selected action
Definition wayland-server-protocol.cpp:2020
wayland::server::data_source_t::target
void target(std::string const &mime_type, bool post=true)
a target accepts an offered mime type
Definition wayland-server-protocol.cpp:1985
wayland::server::data_source_t::cancelled_since_version
static constexpr std::uint32_t cancelled_since_version
Minimum protocol version required for the cancelled function.
Definition wayland-server-protocol.hpp:1213
wayland::server::data_source_t::dnd_finished
void dnd_finished(bool post=true)
the drag-and-drop operation concluded
Definition wayland-server-protocol.cpp:2010
wayland::server::data_source_t::target_since_version
static constexpr std::uint32_t target_since_version
Minimum protocol version required for the target function.
Definition wayland-server-protocol.hpp:1168
wayland::server::data_source_t::post_invalid_source
void post_invalid_source(std::string const &msg)
Post error: source doesn't accept this request.
Definition wayland-server-protocol.cpp:2035
wayland::server::global_base_t
Definition wayland-server.hpp:581
wayland::server::global_t
Definition wayland-server.hpp:626
wayland::server::keyboard_t
keyboard input device
Definition wayland-server-protocol.hpp:3292
wayland::server::keyboard_t::enter
void enter(uint32_t serial, surface_t const &surface, array_t const &keys, bool post=true)
enter event
Definition wayland-server-protocol.cpp:2797
wayland::server::keyboard_t::enter_since_version
static constexpr std::uint32_t enter_since_version
Minimum protocol version required for the enter function.
Definition wayland-server-protocol.hpp:3357
wayland::server::keyboard_t::key_since_version
static constexpr std::uint32_t key_since_version
Minimum protocol version required for the key function.
Definition wayland-server-protocol.hpp:3400
wayland::server::keyboard_t::modifiers
void modifiers(uint32_t serial, uint32_t mods_depressed, uint32_t mods_latched, uint32_t mods_locked, uint32_t group, bool post=true)
modifier and group state
Definition wayland-server-protocol.cpp:2812
wayland::server::keyboard_t::keymap
void keymap(keyboard_keymap_format const &format, int fd, uint32_t size, bool post=true)
keyboard mapping
Definition wayland-server-protocol.cpp:2792
wayland::server::keyboard_t::repeat_info
void repeat_info(int32_t rate, int32_t delay, bool post=true)
repeat rate and delay
Definition wayland-server-protocol.cpp:2817
wayland::server::keyboard_t::leave
void leave(uint32_t serial, surface_t const &surface, bool post=true)
leave event
Definition wayland-server-protocol.cpp:2802
wayland::server::keyboard_t::key
void key(uint32_t serial, uint32_t time, uint32_t key, keyboard_key_state const &state, bool post=true)
key event
Definition wayland-server-protocol.cpp:2807
wayland::server::keyboard_t::leave_since_version
static constexpr std::uint32_t leave_since_version
Minimum protocol version required for the leave function.
Definition wayland-server-protocol.hpp:3377
wayland::server::keyboard_t::repeat_info_since_version
static constexpr std::uint32_t repeat_info_since_version
Minimum protocol version required for the repeat_info function.
Definition wayland-server-protocol.hpp:3441
wayland::server::keyboard_t::on_release
std::function< void()> & on_release()
release the keyboard object
Definition wayland-server-protocol.cpp:2786
wayland::server::keyboard_t::can_repeat_info
bool can_repeat_info() const
Check whether the repeat_info function is available with the currently bound version of the protocol.
Definition wayland-server-protocol.cpp:2822
wayland::server::keyboard_t::keymap_since_version
static constexpr std::uint32_t keymap_since_version
Minimum protocol version required for the keymap function.
Definition wayland-server-protocol.hpp:3339
wayland::server::keyboard_t::modifiers_since_version
static constexpr std::uint32_t modifiers_since_version
Minimum protocol version required for the modifiers function.
Definition wayland-server-protocol.hpp:3417
wayland::server::output_t
compositor output region
Definition wayland-server-protocol.hpp:3707
wayland::server::output_t::done_since_version
static constexpr std::uint32_t done_since_version
Minimum protocol version required for the done function.
Definition wayland-server-protocol.hpp:3834
wayland::server::output_t::on_release
std::function< void()> & on_release()
release the output object
Definition wayland-server-protocol.cpp:2942
wayland::server::output_t::can_name
bool can_name() const
Check whether the name function is available with the currently bound version of the protocol.
Definition wayland-server-protocol.cpp:2983
wayland::server::output_t::name
void name(std::string const &name, bool post=true)
name of this output
Definition wayland-server-protocol.cpp:2978
wayland::server::output_t::mode
void mode(output_mode const &flags, int32_t width, int32_t height, int32_t refresh, bool post=true)
advertise available modes for the output
Definition wayland-server-protocol.cpp:2953
wayland::server::output_t::done
void done(bool post=true)
sent all information about output
Definition wayland-server-protocol.cpp:2958
wayland::server::output_t::geometry
void geometry(int32_t x, int32_t y, int32_t physical_width, int32_t physical_height, output_subpixel const &subpixel, std::string const &make, std::string const &model, output_transform const &transform, bool post=true)
properties of the output
Definition wayland-server-protocol.cpp:2948
wayland::server::output_t::name_since_version
static constexpr std::uint32_t name_since_version
Minimum protocol version required for the name function.
Definition wayland-server-protocol.hpp:3914
wayland::server::output_t::scale
void scale(int32_t factor, bool post=true)
output scaling properties
Definition wayland-server-protocol.cpp:2968
wayland::server::output_t::can_scale
bool can_scale() const
Check whether the scale function is available with the currently bound version of the protocol.
Definition wayland-server-protocol.cpp:2973
wayland::server::output_t::can_done
bool can_done() const
Check whether the done function is available with the currently bound version of the protocol.
Definition wayland-server-protocol.cpp:2963
wayland::server::output_t::description
void description(std::string const &description, bool post=true)
human-readable description of this output
Definition wayland-server-protocol.cpp:2988
wayland::server::output_t::can_description
bool can_description() const
Check whether the description function is available with the currently bound version of the protocol.
Definition wayland-server-protocol.cpp:2993
wayland::server::output_t::scale_since_version
static constexpr std::uint32_t scale_since_version
Minimum protocol version required for the scale function.
Definition wayland-server-protocol.hpp:3870
wayland::server::output_t::mode_since_version
static constexpr std::uint32_t mode_since_version
Minimum protocol version required for the mode function.
Definition wayland-server-protocol.hpp:3819
wayland::server::output_t::geometry_since_version
static constexpr std::uint32_t geometry_since_version
Minimum protocol version required for the geometry function.
Definition wayland-server-protocol.hpp:3772
wayland::server::output_t::description_since_version
static constexpr std::uint32_t description_since_version
Minimum protocol version required for the description function.
Definition wayland-server-protocol.hpp:3944
wayland::server::pointer_t
pointer input device
Definition wayland-server-protocol.hpp:2811
wayland::server::pointer_t::button_since_version
static constexpr std::uint32_t button_since_version
Minimum protocol version required for the button function.
Definition wayland-server-protocol.hpp:2972
wayland::server::pointer_t::motion
void motion(uint32_t time, double surface_x, double surface_y, bool post=true)
pointer motion event
Definition wayland-server-protocol.cpp:2678
wayland::server::pointer_t::axis
void axis(uint32_t time, pointer_axis const &axis, double value, bool post=true)
axis event
Definition wayland-server-protocol.cpp:2688
wayland::server::pointer_t::axis_stop
void axis_stop(uint32_t time, pointer_axis const &axis, bool post=true)
axis stop event
Definition wayland-server-protocol.cpp:2713
wayland::server::pointer_t::on_set_cursor
std::function< void(uint32_t, surface_t, int32_t, int32_t)> & on_set_cursor()
set the pointer surface
Definition wayland-server-protocol.cpp:2656
wayland::server::pointer_t::frame
void frame(bool post=true)
end of a pointer event sequence
Definition wayland-server-protocol.cpp:2693
wayland::server::pointer_t::axis_source_since_version
static constexpr std::uint32_t axis_source_since_version
Minimum protocol version required for the axis_source function.
Definition wayland-server-protocol.hpp:3086
wayland::server::pointer_t::post_role
void post_role(std::string const &msg)
Post error: given wl_surface has another role.
Definition wayland-server-protocol.cpp:2743
wayland::server::pointer_t::leave
void leave(uint32_t serial, surface_t const &surface, bool post=true)
leave event
Definition wayland-server-protocol.cpp:2673
wayland::server::pointer_t::leave_since_version
static constexpr std::uint32_t leave_since_version
Minimum protocol version required for the leave function.
Definition wayland-server-protocol.hpp:2928
wayland::server::pointer_t::can_axis_discrete
bool can_axis_discrete() const
Check whether the axis_discrete function is available with the currently bound version of the protoco...
Definition wayland-server-protocol.cpp:2728
wayland::server::pointer_t::frame_since_version
static constexpr std::uint32_t frame_since_version
Minimum protocol version required for the frame function.
Definition wayland-server-protocol.hpp:3045
wayland::server::pointer_t::can_axis_source
bool can_axis_source() const
Check whether the axis_source function is available with the currently bound version of the protocol.
Definition wayland-server-protocol.cpp:2708
wayland::server::pointer_t::axis_discrete
void axis_discrete(pointer_axis const &axis, int32_t discrete, bool post=true)
axis click event
Definition wayland-server-protocol.cpp:2723
wayland::server::pointer_t::axis_discrete_since_version
static constexpr std::uint32_t axis_discrete_since_version
Minimum protocol version required for the axis_discrete function.
Definition wayland-server-protocol.hpp:3163
wayland::server::pointer_t::on_release
std::function< void()> & on_release()
release the pointer object
Definition wayland-server-protocol.cpp:2662
wayland::server::pointer_t::axis_value120
void axis_value120(pointer_axis const &axis, int32_t value120, bool post=true)
axis high-resolution scroll event
Definition wayland-server-protocol.cpp:2733
wayland::server::pointer_t::button
void button(uint32_t serial, uint32_t time, uint32_t button, pointer_button_state const &state, bool post=true)
pointer button event
Definition wayland-server-protocol.cpp:2683
wayland::server::pointer_t::axis_source
void axis_source(pointer_axis_source const &axis_source, bool post=true)
axis source event
Definition wayland-server-protocol.cpp:2703
wayland::server::pointer_t::can_axis_value120
bool can_axis_value120() const
Check whether the axis_value120 function is available with the currently bound version of the protoco...
Definition wayland-server-protocol.cpp:2738
wayland::server::pointer_t::enter
void enter(uint32_t serial, surface_t const &surface, double surface_x, double surface_y, bool post=true)
enter event
Definition wayland-server-protocol.cpp:2668
wayland::server::pointer_t::can_axis_stop
bool can_axis_stop() const
Check whether the axis_stop function is available with the currently bound version of the protocol.
Definition wayland-server-protocol.cpp:2718
wayland::server::pointer_t::can_frame
bool can_frame() const
Check whether the frame function is available with the currently bound version of the protocol.
Definition wayland-server-protocol.cpp:2698
wayland::server::pointer_t::axis_stop_since_version
static constexpr std::uint32_t axis_stop_since_version
Minimum protocol version required for the axis_stop function.
Definition wayland-server-protocol.hpp:3117
wayland::server::pointer_t::axis_since_version
static constexpr std::uint32_t axis_since_version
Minimum protocol version required for the axis function.
Definition wayland-server-protocol.hpp:3001
wayland::server::pointer_t::axis_value120_since_version
static constexpr std::uint32_t axis_value120_since_version
Minimum protocol version required for the axis_value120 function.
Definition wayland-server-protocol.hpp:3201
wayland::server::pointer_t::motion_since_version
static constexpr std::uint32_t motion_since_version
Minimum protocol version required for the motion function.
Definition wayland-server-protocol.hpp:2944
wayland::server::pointer_t::enter_since_version
static constexpr std::uint32_t enter_since_version
Minimum protocol version required for the enter function.
Definition wayland-server-protocol.hpp:2911
wayland::server::region_t
region interface
Definition wayland-server-protocol.hpp:4044
wayland::server::region_t::on_destroy
std::function< void()> & on_destroy()
destroy region
Definition wayland-server-protocol.cpp:3042
wayland::server::region_t::on_add
std::function< void(int32_t, int32_t, int32_t, int32_t)> & on_add()
add rectangle to region
Definition wayland-server-protocol.cpp:3048
wayland::server::region_t::on_subtract
std::function< void(int32_t, int32_t, int32_t, int32_t)> & on_subtract()
subtract rectangle from region
Definition wayland-server-protocol.cpp:3054
wayland::server::registry_t
global registry object
Definition wayland-server-protocol.hpp:135
wayland::server::registry_t::global
void global(uint32_t name, std::string const &interface, uint32_t version, bool post=true)
announce global object
Definition wayland-server-protocol.cpp:1576
wayland::server::registry_t::global_since_version
static constexpr std::uint32_t global_since_version
Minimum protocol version required for the global function.
Definition wayland-server-protocol.hpp:186
wayland::server::registry_t::on_bind
std::function< void(uint32_t, resource_t)> & on_bind()
bind an object to the display
Definition wayland-server-protocol.cpp:1570
wayland::server::registry_t::global_remove
void global_remove(uint32_t name, bool post=true)
announce removal of global object
Definition wayland-server-protocol.cpp:1581
wayland::server::registry_t::global_remove_since_version
static constexpr std::uint32_t global_remove_since_version
Minimum protocol version required for the global_remove function.
Definition wayland-server-protocol.hpp:207
wayland::server::seat_t
group of input devices
Definition wayland-server-protocol.hpp:2610
wayland::server::seat_t::name
void name(std::string const &name, bool post=true)
unique identifier for this seat
Definition wayland-server-protocol.cpp:2596
wayland::server::seat_t::on_get_pointer
std::function< void(pointer_t)> & on_get_pointer()
return pointer object
Definition wayland-server-protocol.cpp:2567
wayland::server::seat_t::post_missing_capability
void post_missing_capability(std::string const &msg)
Post error: get_pointer, get_keyboard or get_touch called on seat without the matching capability.
Definition wayland-server-protocol.cpp:2606
wayland::server::seat_t::capabilities_since_version
static constexpr std::uint32_t capabilities_since_version
Minimum protocol version required for the capabilities function.
Definition wayland-server-protocol.hpp:2724
wayland::server::seat_t::on_get_keyboard
std::function< void(keyboard_t)> & on_get_keyboard()
return keyboard object
Definition wayland-server-protocol.cpp:2573
wayland::server::seat_t::on_get_touch
std::function< void(touch_t)> & on_get_touch()
return touch object
Definition wayland-server-protocol.cpp:2579
wayland::server::seat_t::on_release
std::function< void()> & on_release()
release the seat object
Definition wayland-server-protocol.cpp:2585
wayland::server::seat_t::capabilities
void capabilities(seat_capability const &capabilities, bool post=true)
seat capabilities changed
Definition wayland-server-protocol.cpp:2591
wayland::server::seat_t::can_name
bool can_name() const
Check whether the name function is available with the currently bound version of the protocol.
Definition wayland-server-protocol.cpp:2601
wayland::server::seat_t::name_since_version
static constexpr std::uint32_t name_since_version
Minimum protocol version required for the name function.
Definition wayland-server-protocol.hpp:2751
wayland::server::shell_surface_t
desktop-style metadata interface
Definition wayland-server-protocol.hpp:1742
wayland::server::shell_surface_t::on_move
std::function< void(seat_t, uint32_t)> & on_move()
start an interactive move
Definition wayland-server-protocol.cpp:2269
wayland::server::shell_surface_t::configure_since_version
static constexpr std::uint32_t configure_since_version
Minimum protocol version required for the configure function.
Definition wayland-server-protocol.hpp:2004
wayland::server::shell_surface_t::on_set_class
std::function< void(std::string)> & on_set_class()
set surface class
Definition wayland-server-protocol.cpp:2317
wayland::server::shell_surface_t::on_resize
std::function< void(seat_t, uint32_t, shell_surface_resize)> & on_resize()
start an interactive resize
Definition wayland-server-protocol.cpp:2275
wayland::server::shell_surface_t::on_set_title
std::function< void(std::string)> & on_set_title()
set surface title
Definition wayland-server-protocol.cpp:2311
wayland::server::shell_surface_t::on_set_transient
std::function< void(surface_t, int32_t, int32_t, shell_surface_transient)> & on_set_transient()
make the surface a transient surface
Definition wayland-server-protocol.cpp:2287
wayland::server::shell_surface_t::on_set_maximized
std::function< void(output_t)> & on_set_maximized()
make the surface a maximized surface
Definition wayland-server-protocol.cpp:2305
wayland::server::shell_surface_t::ping_since_version
static constexpr std::uint32_t ping_since_version
Minimum protocol version required for the ping function.
Definition wayland-server-protocol.hpp:1974
wayland::server::shell_surface_t::ping
void ping(uint32_t serial, bool post=true)
ping client
Definition wayland-server-protocol.cpp:2323
wayland::server::shell_surface_t::on_set_fullscreen
std::function< void(shell_surface_fullscreen_method, uint32_t, output_t)> & on_set_fullscreen()
make the surface a fullscreen surface
Definition wayland-server-protocol.cpp:2293
wayland::server::shell_surface_t::on_set_toplevel
std::function< void()> & on_set_toplevel()
make the surface a toplevel surface
Definition wayland-server-protocol.cpp:2281
wayland::server::shell_surface_t::on_pong
std::function< void(uint32_t)> & on_pong()
respond to a ping event
Definition wayland-server-protocol.cpp:2263
wayland::server::shell_surface_t::popup_done
void popup_done(bool post=true)
popup interaction is done
Definition wayland-server-protocol.cpp:2333
wayland::server::shell_surface_t::configure
void configure(shell_surface_resize const &edges, int32_t width, int32_t height, bool post=true)
suggest resize
Definition wayland-server-protocol.cpp:2328
wayland::server::shell_surface_t::on_set_popup
std::function< void(seat_t, uint32_t, surface_t, int32_t, int32_t, shell_surface_transient)> & on_set_popup()
make the surface a popup surface
Definition wayland-server-protocol.cpp:2299
wayland::server::shell_surface_t::popup_done_since_version
static constexpr std::uint32_t popup_done_since_version
Minimum protocol version required for the popup_done function.
Definition wayland-server-protocol.hpp:2017
wayland::server::shell_t
create desktop-style surfaces
Definition wayland-server-protocol.hpp:1670
wayland::server::shell_t::on_get_shell_surface
std::function< void(shell_surface_t, surface_t)> & on_get_shell_surface()
create a shell surface from a surface
Definition wayland-server-protocol.cpp:2220
wayland::server::shell_t::post_role
void post_role(std::string const &msg)
Post error: given wl_surface has another role.
Definition wayland-server-protocol.cpp:2226
wayland::server::shm_pool_t
a shared memory pool
Definition wayland-server-protocol.hpp:329
wayland::server::shm_pool_t::on_destroy
std::function< void()> & on_destroy()
destroy the pool
Definition wayland-server-protocol.cpp:1698
wayland::server::shm_pool_t::on_resize
std::function< void(int32_t)> & on_resize()
change the size of the pool mapping
Definition wayland-server-protocol.cpp:1704
wayland::server::shm_pool_t::on_create_buffer
std::function< void(buffer_t, int32_t, int32_t, int32_t, int32_t, shm_format)> & on_create_buffer()
create a buffer from the pool
Definition wayland-server-protocol.cpp:1692
wayland::server::shm_t
shared memory support
Definition wayland-server-protocol.hpp:426
wayland::server::shm_t::format_since_version
static constexpr std::uint32_t format_since_version
Minimum protocol version required for the format function.
Definition wayland-server-protocol.hpp:477
wayland::server::shm_t::post_invalid_format
void post_invalid_format(std::string const &msg)
Post error: buffer format is not known.
Definition wayland-server-protocol.cpp:1758
wayland::server::shm_t::on_create_pool
std::function< void(shm_pool_t, int, int32_t)> & on_create_pool()
create a shm pool
Definition wayland-server-protocol.cpp:1747
wayland::server::shm_t::post_invalid_fd
void post_invalid_fd(std::string const &msg)
Post error: mmapping the file descriptor failed.
Definition wayland-server-protocol.cpp:1768
wayland::server::shm_t::format
void format(shm_format const &format, bool post=true)
pixel format description
Definition wayland-server-protocol.cpp:1753
wayland::server::shm_t::post_invalid_stride
void post_invalid_stride(std::string const &msg)
Post error: invalid size or stride during pool or buffer creation.
Definition wayland-server-protocol.cpp:1763
wayland::server::subcompositor_t
sub-surface compositing
Definition wayland-server-protocol.hpp:4129
wayland::server::subcompositor_t::on_get_subsurface
std::function< void(subsurface_t, surface_t, surface_t)> & on_get_subsurface()
give a surface the role sub-surface
Definition wayland-server-protocol.cpp:3103
wayland::server::subcompositor_t::on_destroy
std::function< void()> & on_destroy()
unbind from the subcompositor interface
Definition wayland-server-protocol.cpp:3097
wayland::server::subcompositor_t::post_bad_surface
void post_bad_surface(std::string const &msg)
Post error: the to-be sub-surface is invalid.
Definition wayland-server-protocol.cpp:3109
wayland::server::subsurface_t
sub-surface interface to a wl_surface
Definition wayland-server-protocol.hpp:4260
wayland::server::subsurface_t::on_set_sync
std::function< void()> & on_set_sync()
set sub-surface to synchronized mode
Definition wayland-server-protocol.cpp:3173
wayland::server::subsurface_t::on_set_desync
std::function< void()> & on_set_desync()
set sub-surface to desynchronized mode
Definition wayland-server-protocol.cpp:3179
wayland::server::subsurface_t::on_set_position
std::function< void(int32_t, int32_t)> & on_set_position()
reposition the sub-surface
Definition wayland-server-protocol.cpp:3155
wayland::server::subsurface_t::on_place_below
std::function< void(surface_t)> & on_place_below()
restack the sub-surface
Definition wayland-server-protocol.cpp:3167
wayland::server::subsurface_t::on_place_above
std::function< void(surface_t)> & on_place_above()
restack the sub-surface
Definition wayland-server-protocol.cpp:3161
wayland::server::subsurface_t::post_bad_surface
void post_bad_surface(std::string const &msg)
Post error: wl_surface is not a sibling or the parent.
Definition wayland-server-protocol.cpp:3185
wayland::server::subsurface_t::on_destroy
std::function< void()> & on_destroy()
remove sub-surface interface
Definition wayland-server-protocol.cpp:3149
wayland::server::surface_t
an onscreen surface
Definition wayland-server-protocol.hpp:2139
wayland::server::surface_t::enter
void enter(output_t const &output, bool post=true)
surface enters an output
Definition wayland-server-protocol.cpp:2475
wayland::server::surface_t::on_attach
std::function< void(buffer_t, int32_t, int32_t)> & on_attach()
set the surface contents
Definition wayland-server-protocol.cpp:2415
wayland::server::surface_t::enter_since_version
static constexpr std::uint32_t enter_since_version
Minimum protocol version required for the enter function.
Definition wayland-server-protocol.hpp:2541
wayland::server::surface_t::post_invalid_offset
void post_invalid_offset(std::string const &msg)
Post error: buffer offset is invalid.
Definition wayland-server-protocol.cpp:2500
wayland::server::surface_t::leave_since_version
static constexpr std::uint32_t leave_since_version
Minimum protocol version required for the leave function.
Definition wayland-server-protocol.hpp:2561
wayland::server::surface_t::on_set_input_region
std::function< void(region_t)> & on_set_input_region()
set input region
Definition wayland-server-protocol.cpp:2439
wayland::server::surface_t::post_invalid_scale
void post_invalid_scale(std::string const &msg)
Post error: buffer scale value is invalid.
Definition wayland-server-protocol.cpp:2485
wayland::server::surface_t::on_damage
std::function< void(int32_t, int32_t, int32_t, int32_t)> & on_damage()
mark part of the surface damaged
Definition wayland-server-protocol.cpp:2421
wayland::server::surface_t::on_frame
std::function< void(callback_t)> & on_frame()
request a frame throttling hint
Definition wayland-server-protocol.cpp:2427
wayland::server::surface_t::on_offset
std::function< void(int32_t, int32_t)> & on_offset()
set the surface contents offset
Definition wayland-server-protocol.cpp:2469
wayland::server::surface_t::on_set_buffer_scale
std::function< void(int32_t)> & on_set_buffer_scale()
sets the buffer scaling factor
Definition wayland-server-protocol.cpp:2457
wayland::server::surface_t::post_invalid_size
void post_invalid_size(std::string const &msg)
Post error: buffer size is invalid.
Definition wayland-server-protocol.cpp:2495
wayland::server::surface_t::on_set_opaque_region
std::function< void(region_t)> & on_set_opaque_region()
set opaque region
Definition wayland-server-protocol.cpp:2433
wayland::server::surface_t::on_commit
std::function< void()> & on_commit()
commit pending surface state
Definition wayland-server-protocol.cpp:2445
wayland::server::surface_t::on_damage_buffer
std::function< void(int32_t, int32_t, int32_t, int32_t)> & on_damage_buffer()
mark part of the surface damaged using buffer coordinates
Definition wayland-server-protocol.cpp:2463
wayland::server::surface_t::leave
void leave(output_t const &output, bool post=true)
surface leaves an output
Definition wayland-server-protocol.cpp:2480
wayland::server::surface_t::on_destroy
std::function< void()> & on_destroy()
delete surface
Definition wayland-server-protocol.cpp:2409
wayland::server::surface_t::post_invalid_transform
void post_invalid_transform(std::string const &msg)
Post error: buffer transform value is invalid.
Definition wayland-server-protocol.cpp:2490
wayland::server::surface_t::on_set_buffer_transform
std::function< void(output_transform)> & on_set_buffer_transform()
sets the buffer transformation
Definition wayland-server-protocol.cpp:2451
wayland::server::touch_t
touchscreen input device
Definition wayland-server-protocol.hpp:3493
wayland::server::touch_t::cancel
void cancel(bool post=true)
touch session cancelled
Definition wayland-server-protocol.cpp:2886
wayland::server::touch_t::motion
void motion(uint32_t time, int32_t id, double x, double y, bool post=true)
update of touch point coordinates
Definition wayland-server-protocol.cpp:2876
wayland::server::touch_t::orientation
void orientation(int32_t id, double orientation, bool post=true)
update orientation of touch point
Definition wayland-server-protocol.cpp:2901
wayland::server::touch_t::up
void up(uint32_t serial, uint32_t time, int32_t id, bool post=true)
end of a touch event sequence
Definition wayland-server-protocol.cpp:2871
wayland::server::touch_t::down_since_version
static constexpr std::uint32_t down_since_version
Minimum protocol version required for the down function.
Definition wayland-server-protocol.hpp:3541
wayland::server::touch_t::down
void down(uint32_t serial, uint32_t time, surface_t const &surface, int32_t id, double x, double y, bool post=true)
touch down event and beginning of a touch sequence
Definition wayland-server-protocol.cpp:2866
wayland::server::touch_t::frame_since_version
static constexpr std::uint32_t frame_since_version
Minimum protocol version required for the frame function.
Definition wayland-server-protocol.hpp:3590
wayland::server::touch_t::shape
void shape(int32_t id, double major, double minor, bool post=true)
update shape of touch point
Definition wayland-server-protocol.cpp:2891
wayland::server::touch_t::up_since_version
static constexpr std::uint32_t up_since_version
Minimum protocol version required for the up function.
Definition wayland-server-protocol.hpp:3557
wayland::server::touch_t::cancel_since_version
static constexpr std::uint32_t cancel_since_version
Minimum protocol version required for the cancel function.
Definition wayland-server-protocol.hpp:3606
wayland::server::touch_t::shape_since_version
static constexpr std::uint32_t shape_since_version
Minimum protocol version required for the shape function.
Definition wayland-server-protocol.hpp:3644
wayland::server::touch_t::can_shape
bool can_shape() const
Check whether the shape function is available with the currently bound version of the protocol.
Definition wayland-server-protocol.cpp:2896
wayland::server::touch_t::orientation_since_version
static constexpr std::uint32_t orientation_since_version
Minimum protocol version required for the orientation function.
Definition wayland-server-protocol.hpp:3684
wayland::server::touch_t::frame
void frame(bool post=true)
end of touch frame event
Definition wayland-server-protocol.cpp:2881
wayland::server::touch_t::motion_since_version
static constexpr std::uint32_t motion_since_version
Minimum protocol version required for the motion function.
Definition wayland-server-protocol.hpp:3572
wayland::server::touch_t::can_orientation
bool can_orientation() const
Check whether the orientation function is available with the currently bound version of the protocol.
Definition wayland-server-protocol.cpp:2906
wayland::server::touch_t::on_release
std::function< void()> & on_release()
release the touch object
Definition wayland-server-protocol.cpp:2860
wayland::server::data_device_manager_dnd_action
drag and drop actions
Definition wayland-server-protocol.hpp:1640
wayland::server::data_device_manager_dnd_action::copy
static const wayland::detail::bitfield< 3, 6 > copy
copy action
Definition wayland-server-protocol.hpp:1648
wayland::server::data_device_manager_dnd_action::move
static const wayland::detail::bitfield< 3, 6 > move
move action
Definition wayland-server-protocol.hpp:1650
wayland::server::data_device_manager_dnd_action::ask
static const wayland::detail::bitfield< 3, 6 > ask
ask action
Definition wayland-server-protocol.hpp:1652
wayland::server::data_device_manager_dnd_action::none
static const wayland::detail::bitfield< 3, 6 > none
no action
Definition wayland-server-protocol.hpp:1646
wayland::server::output_mode
mode information
Definition wayland-server-protocol.hpp:4023
wayland::server::output_mode::current
static const wayland::detail::bitfield< 2, 22 > current
indicates this is the current mode
Definition wayland-server-protocol.hpp:4029
wayland::server::output_mode::preferred
static const wayland::detail::bitfield< 2, 22 > preferred
indicates this is the preferred mode
Definition wayland-server-protocol.hpp:4031
wayland::server::output_transform
transform from framebuffer to output
Definition wayland-server-protocol.hpp:3993
wayland::server::output_transform::normal
static const wayland::detail::bitfield< 3, 21 > normal
no transform
Definition wayland-server-protocol.hpp:3999
wayland::server::output_transform::flipped_180
static const wayland::detail::bitfield< 3, 21 > flipped_180
flip and rotate 180 degrees counter-clockwise
Definition wayland-server-protocol.hpp:4011
wayland::server::output_transform::flipped
static const wayland::detail::bitfield< 3, 21 > flipped
180 degree flip around a vertical axis
Definition wayland-server-protocol.hpp:4007
wayland::server::output_transform::_270
static const wayland::detail::bitfield< 3, 21 > _270
270 degrees counter-clockwise
Definition wayland-server-protocol.hpp:4005
wayland::server::output_transform::_180
static const wayland::detail::bitfield< 3, 21 > _180
180 degrees counter-clockwise
Definition wayland-server-protocol.hpp:4003
wayland::server::output_transform::flipped_90
static const wayland::detail::bitfield< 3, 21 > flipped_90
flip and rotate 90 degrees counter-clockwise
Definition wayland-server-protocol.hpp:4009
wayland::server::output_transform::flipped_270
static const wayland::detail::bitfield< 3, 21 > flipped_270
flip and rotate 270 degrees counter-clockwise
Definition wayland-server-protocol.hpp:4013
wayland::server::output_transform::_90
static const wayland::detail::bitfield< 3, 21 > _90
90 degrees counter-clockwise
Definition wayland-server-protocol.hpp:4001
wayland::server::seat_capability
seat capability bitmask
Definition wayland-server-protocol.hpp:2773
wayland::server::seat_capability::keyboard
static const wayland::detail::bitfield< 3, 12 > keyboard
the seat has one or more keyboards
Definition wayland-server-protocol.hpp:2781
wayland::server::seat_capability::touch
static const wayland::detail::bitfield< 3, 12 > touch
the seat has touch devices
Definition wayland-server-protocol.hpp:2783
wayland::server::seat_capability::pointer
static const wayland::detail::bitfield< 3, 12 > pointer
the seat has pointer devices
Definition wayland-server-protocol.hpp:2779
wayland::server::shell_surface_resize
edge values for resizing
Definition wayland-server-protocol.hpp:2032
wayland::server::shell_surface_resize::bottom_left
static const wayland::detail::bitfield< 4, 8 > bottom_left
bottom and left edges
Definition wayland-server-protocol.hpp:2048
wayland::server::shell_surface_resize::top_right
static const wayland::detail::bitfield< 4, 8 > top_right
top and right edges
Definition wayland-server-protocol.hpp:2052
wayland::server::shell_surface_resize::bottom_right
static const wayland::detail::bitfield< 4, 8 > bottom_right
bottom and right edges
Definition wayland-server-protocol.hpp:2054
wayland::server::shell_surface_resize::bottom
static const wayland::detail::bitfield< 4, 8 > bottom
bottom edge
Definition wayland-server-protocol.hpp:2042
wayland::server::shell_surface_resize::right
static const wayland::detail::bitfield< 4, 8 > right
right edge
Definition wayland-server-protocol.hpp:2050
wayland::server::shell_surface_resize::left
static const wayland::detail::bitfield< 4, 8 > left
left edge
Definition wayland-server-protocol.hpp:2044
wayland::server::shell_surface_resize::none
static const wayland::detail::bitfield< 4, 8 > none
no edge
Definition wayland-server-protocol.hpp:2038
wayland::server::shell_surface_resize::top
static const wayland::detail::bitfield< 4, 8 > top
top edge
Definition wayland-server-protocol.hpp:2040
wayland::server::shell_surface_resize::top_left
static const wayland::detail::bitfield< 4, 8 > top_left
top and left edges
Definition wayland-server-protocol.hpp:2046
wayland::server::shell_surface_transient
details of transient behaviour
Definition wayland-server-protocol.hpp:2064
wayland::server::shell_surface_transient::inactive
static const wayland::detail::bitfield< 1, 9 > inactive
do not set keyboard focus
Definition wayland-server-protocol.hpp:2070
wayland-server.hpp