Loading...
Searching...
No Matches
wayland-client-protocol.hpp
#pragma once
#include <array>
#include <functional>
#include <memory>
#include <string>
#include <vector>
#include <wayland-client.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
{
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 proxy_t
{
private:
struct events_t : public detail::events_base_t
{
std::function<void(uint32_t, std::string, uint32_t)> global;
std::function<void(uint32_t)> global_remove;
};
static int dispatcher(uint32_t opcode, const std::vector<detail::any>& args, const std::shared_ptr<detail::events_base_t>& e);
registry_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/);
public:
registry_t();
explicit registry_t(const proxy_t &proxy);
registry_t(wl_registry *p, wrapper_type t = wrapper_type::standard);
registry_t proxy_create_wrapper();
static const std::string interface_name;
operator wl_registry*() const;
proxy_t bind(uint32_t name, proxy_t &interface, uint32_t version);
static constexpr std::uint32_t bind_since_version = 1;
std::function<void(uint32_t, std::string, uint32_t)> &on_global();
std::function<void(uint32_t)> &on_global_remove();
};
class callback_t : public proxy_t
{
private:
struct events_t : public detail::events_base_t
{
std::function<void(uint32_t)> done;
};
static int dispatcher(uint32_t opcode, const std::vector<detail::any>& args, const std::shared_ptr<detail::events_base_t>& e);
callback_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/);
public:
callback_t();
explicit callback_t(const proxy_t &proxy);
callback_t(wl_callback *p, wrapper_type t = wrapper_type::standard);
callback_t proxy_create_wrapper();
static const std::string interface_name;
operator wl_callback*() const;
std::function<void(uint32_t)> &on_done();
};
class compositor_t : public proxy_t
{
private:
struct events_t : public detail::events_base_t
{
};
static int dispatcher(uint32_t opcode, const std::vector<detail::any>& args, const std::shared_ptr<detail::events_base_t>& e);
compositor_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/);
public:
compositor_t();
explicit compositor_t(const proxy_t &proxy);
compositor_t(wl_compositor *p, wrapper_type t = wrapper_type::standard);
compositor_t proxy_create_wrapper();
static const std::string interface_name;
operator wl_compositor*() const;
surface_t create_surface();
static constexpr std::uint32_t create_surface_since_version = 1;
region_t create_region();
static constexpr std::uint32_t create_region_since_version = 1;
};
class shm_pool_t : public proxy_t
{
private:
struct events_t : public detail::events_base_t
{
};
static int dispatcher(uint32_t opcode, const std::vector<detail::any>& args, const std::shared_ptr<detail::events_base_t>& e);
shm_pool_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/);
public:
shm_pool_t();
explicit shm_pool_t(const proxy_t &proxy);
shm_pool_t(wl_shm_pool *p, wrapper_type t = wrapper_type::standard);
shm_pool_t proxy_create_wrapper();
static const std::string interface_name;
operator wl_shm_pool*() const;
buffer_t create_buffer(int32_t offset, int32_t width, int32_t height, int32_t stride, shm_format const& format);
static constexpr std::uint32_t create_buffer_since_version = 1;
void resize(int32_t size);
static constexpr std::uint32_t resize_since_version = 1;
};
class shm_t : public proxy_t
{
private:
struct events_t : public detail::events_base_t
{
std::function<void(shm_format)> format;
};
static int dispatcher(uint32_t opcode, const std::vector<detail::any>& args, const std::shared_ptr<detail::events_base_t>& e);
shm_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/);
public:
shm_t();
explicit shm_t(const proxy_t &proxy);
shm_t(wl_shm *p, wrapper_type t = wrapper_type::standard);
shm_t proxy_create_wrapper();
static const std::string interface_name;
operator wl_shm*() const;
shm_pool_t create_pool(int fd, int32_t size);
static constexpr std::uint32_t create_pool_since_version = 1;
std::function<void(shm_format)> &on_format();
};
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 proxy_t
{
private:
struct events_t : public detail::events_base_t
{
std::function<void()> release;
};
static int dispatcher(uint32_t opcode, const std::vector<detail::any>& args, const std::shared_ptr<detail::events_base_t>& e);
buffer_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/);
public:
buffer_t();
explicit buffer_t(const proxy_t &proxy);
buffer_t(wl_buffer *p, wrapper_type t = wrapper_type::standard);
buffer_t proxy_create_wrapper();
static const std::string interface_name;
operator wl_buffer*() const;
std::function<void()> &on_release();
};
class data_offer_t : public proxy_t
{
private:
struct events_t : public detail::events_base_t
{
std::function<void(std::string)> offer;
std::function<void(data_device_manager_dnd_action)> source_actions;
std::function<void(data_device_manager_dnd_action)> action;
};
static int dispatcher(uint32_t opcode, const std::vector<detail::any>& args, const std::shared_ptr<detail::events_base_t>& e);
data_offer_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/);
public:
data_offer_t();
explicit data_offer_t(const proxy_t &proxy);
data_offer_t(wl_data_offer *p, wrapper_type t = wrapper_type::standard);
data_offer_t proxy_create_wrapper();
static const std::string interface_name;
operator wl_data_offer*() const;
void accept(uint32_t serial, std::string const& mime_type);
static constexpr std::uint32_t accept_since_version = 1;
void receive(std::string const& mime_type, int fd);
static constexpr std::uint32_t receive_since_version = 1;
void finish();
static constexpr std::uint32_t finish_since_version = 3;
bool can_finish() const;
void set_actions(data_device_manager_dnd_action const& dnd_actions, data_device_manager_dnd_action const& preferred_action);
static constexpr std::uint32_t set_actions_since_version = 3;
bool can_set_actions() const;
std::function<void(std::string)> &on_offer();
std::function<void(data_device_manager_dnd_action)> &on_source_actions();
std::function<void(data_device_manager_dnd_action)> &on_action();
};
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 proxy_t
{
private:
struct events_t : public detail::events_base_t
{
std::function<void(std::string)> target;
std::function<void(std::string, int)> send;
std::function<void()> cancelled;
std::function<void()> dnd_drop_performed;
std::function<void()> dnd_finished;
std::function<void(data_device_manager_dnd_action)> action;
};
static int dispatcher(uint32_t opcode, const std::vector<detail::any>& args, const std::shared_ptr<detail::events_base_t>& e);
data_source_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/);
public:
data_source_t();
explicit data_source_t(const proxy_t &proxy);
data_source_t(wl_data_source *p, wrapper_type t = wrapper_type::standard);
data_source_t proxy_create_wrapper();
static const std::string interface_name;
operator wl_data_source*() const;
void offer(std::string const& mime_type);
static constexpr std::uint32_t offer_since_version = 1;
void set_actions(data_device_manager_dnd_action const& dnd_actions);
static constexpr std::uint32_t set_actions_since_version = 3;
bool can_set_actions() const;
std::function<void(std::string)> &on_target();
std::function<void(std::string, int)> &on_send();
std::function<void()> &on_cancelled();
std::function<void()> &on_dnd_drop_performed();
std::function<void()> &on_dnd_finished();
std::function<void(data_device_manager_dnd_action)> &on_action();
};
enum class data_source_error : uint32_t
{
invalid_action_mask = 0,
invalid_source = 1
};
class data_device_t : public proxy_t
{
private:
struct events_t : public detail::events_base_t
{
std::function<void(data_offer_t)> data_offer;
std::function<void(uint32_t, surface_t, double, double, data_offer_t)> enter;
std::function<void()> leave;
std::function<void(uint32_t, double, double)> motion;
std::function<void()> drop;
std::function<void(data_offer_t)> selection;
};
static int dispatcher(uint32_t opcode, const std::vector<detail::any>& args, const std::shared_ptr<detail::events_base_t>& e);
data_device_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/);
public:
data_device_t();
explicit data_device_t(const proxy_t &proxy);
data_device_t(wl_data_device *p, wrapper_type t = wrapper_type::standard);
data_device_t proxy_create_wrapper();
static const std::string interface_name;
operator wl_data_device*() const;
void start_drag(data_source_t const& source, surface_t const& origin, surface_t const& icon, uint32_t serial);
static constexpr std::uint32_t start_drag_since_version = 1;
void set_selection(data_source_t const& source, uint32_t serial);
static constexpr std::uint32_t set_selection_since_version = 1;
void release();
static constexpr std::uint32_t release_since_version = 2;
bool can_release() const;
std::function<void(data_offer_t)> &on_data_offer();
std::function<void(uint32_t, surface_t, double, double, data_offer_t)> &on_enter();
std::function<void()> &on_leave();
std::function<void(uint32_t, double, double)> &on_motion();
std::function<void()> &on_drop();
std::function<void(data_offer_t)> &on_selection();
};
enum class data_device_error : uint32_t
{
role = 0
};
class data_device_manager_t : public proxy_t
{
private:
struct events_t : public detail::events_base_t
{
};
static int dispatcher(uint32_t opcode, const std::vector<detail::any>& args, const std::shared_ptr<detail::events_base_t>& e);
data_device_manager_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/);
public:
data_device_manager_t();
explicit data_device_manager_t(const proxy_t &proxy);
data_device_manager_t(wl_data_device_manager *p, wrapper_type t = wrapper_type::standard);
data_device_manager_t proxy_create_wrapper();
static const std::string interface_name;
operator wl_data_device_manager*() const;
data_source_t create_data_source();
static constexpr std::uint32_t create_data_source_since_version = 1;
data_device_t get_data_device(seat_t const& seat);
static constexpr std::uint32_t get_data_device_since_version = 1;
};
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 proxy_t
{
private:
struct events_t : public detail::events_base_t
{
};
static int dispatcher(uint32_t opcode, const std::vector<detail::any>& args, const std::shared_ptr<detail::events_base_t>& e);
shell_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/);
public:
shell_t();
explicit shell_t(const proxy_t &proxy);
shell_t(wl_shell *p, wrapper_type t = wrapper_type::standard);
shell_t proxy_create_wrapper();
static const std::string interface_name;
operator wl_shell*() const;
shell_surface_t get_shell_surface(surface_t const& surface);
static constexpr std::uint32_t get_shell_surface_since_version = 1;
};
enum class shell_error : uint32_t
{
role = 0
};
class shell_surface_t : public proxy_t
{
private:
struct events_t : public detail::events_base_t
{
std::function<void(uint32_t)> ping;
std::function<void(shell_surface_resize, int32_t, int32_t)> configure;
std::function<void()> popup_done;
};
static int dispatcher(uint32_t opcode, const std::vector<detail::any>& args, const std::shared_ptr<detail::events_base_t>& e);
shell_surface_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/);
public:
shell_surface_t();
explicit shell_surface_t(const proxy_t &proxy);
shell_surface_t(wl_shell_surface *p, wrapper_type t = wrapper_type::standard);
shell_surface_t proxy_create_wrapper();
static const std::string interface_name;
operator wl_shell_surface*() const;
void pong(uint32_t serial);
static constexpr std::uint32_t pong_since_version = 1;
void move(seat_t const& seat, uint32_t serial);
static constexpr std::uint32_t move_since_version = 1;
void resize(seat_t const& seat, uint32_t serial, shell_surface_resize const& edges);
static constexpr std::uint32_t resize_since_version = 1;
void set_toplevel();
static constexpr std::uint32_t set_toplevel_since_version = 1;
void set_transient(surface_t const& parent, int32_t x, int32_t y, shell_surface_transient const& flags);
static constexpr std::uint32_t set_transient_since_version = 1;
void set_fullscreen(shell_surface_fullscreen_method const& method, uint32_t framerate, output_t const& output);
static constexpr std::uint32_t set_fullscreen_since_version = 1;
void set_popup(seat_t const& seat, uint32_t serial, surface_t const& parent, int32_t x, int32_t y, shell_surface_transient const& flags);
static constexpr std::uint32_t set_popup_since_version = 1;
void set_maximized(output_t const& output);
static constexpr std::uint32_t set_maximized_since_version = 1;
void set_title(std::string const& title);
static constexpr std::uint32_t set_title_since_version = 1;
void set_class(std::string const& class_);
static constexpr std::uint32_t set_class_since_version = 1;
std::function<void(uint32_t)> &on_ping();
std::function<void(shell_surface_resize, int32_t, int32_t)> &on_configure();
std::function<void()> &on_popup_done();
};
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 proxy_t
{
private:
struct events_t : public detail::events_base_t
{
std::function<void(output_t)> enter;
std::function<void(output_t)> leave;
};
static int dispatcher(uint32_t opcode, const std::vector<detail::any>& args, const std::shared_ptr<detail::events_base_t>& e);
surface_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/);
public:
surface_t();
explicit surface_t(const proxy_t &proxy);
surface_t(wl_surface *p, wrapper_type t = wrapper_type::standard);
surface_t proxy_create_wrapper();
static const std::string interface_name;
operator wl_surface*() const;
void attach(buffer_t const& buffer, int32_t x, int32_t y);
static constexpr std::uint32_t attach_since_version = 1;
void damage(int32_t x, int32_t y, int32_t width, int32_t height);
static constexpr std::uint32_t damage_since_version = 1;
callback_t frame();
static constexpr std::uint32_t frame_since_version = 1;
void set_opaque_region(region_t const& region);
static constexpr std::uint32_t set_opaque_region_since_version = 1;
void set_input_region(region_t const& region);
static constexpr std::uint32_t set_input_region_since_version = 1;
void commit();
static constexpr std::uint32_t commit_since_version = 1;
void set_buffer_transform(output_transform const& transform);
static constexpr std::uint32_t set_buffer_transform_since_version = 2;
bool can_set_buffer_transform() const;
void set_buffer_scale(int32_t scale);
static constexpr std::uint32_t set_buffer_scale_since_version = 3;
bool can_set_buffer_scale() const;
void damage_buffer(int32_t x, int32_t y, int32_t width, int32_t height);
static constexpr std::uint32_t damage_buffer_since_version = 4;
bool can_damage_buffer() const;
void offset(int32_t x, int32_t y);
static constexpr std::uint32_t offset_since_version = 5;
bool can_offset() const;
std::function<void(output_t)> &on_enter();
std::function<void(output_t)> &on_leave();
};
enum class surface_error : uint32_t
{
invalid_scale = 0,
invalid_transform = 1,
invalid_size = 2,
invalid_offset = 3
};
class seat_t : public proxy_t
{
private:
struct events_t : public detail::events_base_t
{
std::function<void(seat_capability)> capabilities;
std::function<void(std::string)> name;
};
static int dispatcher(uint32_t opcode, const std::vector<detail::any>& args, const std::shared_ptr<detail::events_base_t>& e);
seat_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/);
public:
seat_t();
explicit seat_t(const proxy_t &proxy);
seat_t(wl_seat *p, wrapper_type t = wrapper_type::standard);
seat_t proxy_create_wrapper();
static const std::string interface_name;
operator wl_seat*() const;
pointer_t get_pointer();
static constexpr std::uint32_t get_pointer_since_version = 1;
keyboard_t get_keyboard();
static constexpr std::uint32_t get_keyboard_since_version = 1;
touch_t get_touch();
static constexpr std::uint32_t get_touch_since_version = 1;
void release();
static constexpr std::uint32_t release_since_version = 5;
bool can_release() const;
std::function<void(seat_capability)> &on_capabilities();
std::function<void(std::string)> &on_name();
};
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 proxy_t
{
private:
struct events_t : public detail::events_base_t
{
std::function<void(uint32_t, surface_t, double, double)> enter;
std::function<void(uint32_t, surface_t)> leave;
std::function<void(uint32_t, double, double)> motion;
std::function<void(uint32_t, uint32_t, uint32_t, pointer_button_state)> button;
std::function<void(uint32_t, pointer_axis, double)> axis;
std::function<void()> frame;
std::function<void(pointer_axis_source)> axis_source;
std::function<void(uint32_t, pointer_axis)> axis_stop;
std::function<void(pointer_axis, int32_t)> axis_discrete;
std::function<void(pointer_axis, int32_t)> axis_value120;
};
static int dispatcher(uint32_t opcode, const std::vector<detail::any>& args, const std::shared_ptr<detail::events_base_t>& e);
pointer_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/);
public:
pointer_t();
explicit pointer_t(const proxy_t &proxy);
pointer_t(wl_pointer *p, wrapper_type t = wrapper_type::standard);
pointer_t proxy_create_wrapper();
static const std::string interface_name;
operator wl_pointer*() const;
void set_cursor(uint32_t serial, surface_t const& surface, int32_t hotspot_x, int32_t hotspot_y);
static constexpr std::uint32_t set_cursor_since_version = 1;
void release();
static constexpr std::uint32_t release_since_version = 3;
bool can_release() const;
std::function<void(uint32_t, surface_t, double, double)> &on_enter();
std::function<void(uint32_t, surface_t)> &on_leave();
std::function<void(uint32_t, double, double)> &on_motion();
std::function<void(uint32_t, uint32_t, uint32_t, pointer_button_state)> &on_button();
std::function<void(uint32_t, pointer_axis, double)> &on_axis();
std::function<void()> &on_frame();
std::function<void(pointer_axis_source)> &on_axis_source();
std::function<void(uint32_t, pointer_axis)> &on_axis_stop();
std::function<void(pointer_axis, int32_t)> &on_axis_discrete();
std::function<void(pointer_axis, int32_t)> &on_axis_value120();
};
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 proxy_t
{
private:
struct events_t : public detail::events_base_t
{
std::function<void(keyboard_keymap_format, int, uint32_t)> keymap;
std::function<void(uint32_t, surface_t, array_t)> enter;
std::function<void(uint32_t, surface_t)> leave;
std::function<void(uint32_t, uint32_t, uint32_t, keyboard_key_state)> key;
std::function<void(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t)> modifiers;
std::function<void(int32_t, int32_t)> repeat_info;
};
static int dispatcher(uint32_t opcode, const std::vector<detail::any>& args, const std::shared_ptr<detail::events_base_t>& e);
keyboard_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/);
public:
keyboard_t();
explicit keyboard_t(const proxy_t &proxy);
keyboard_t(wl_keyboard *p, wrapper_type t = wrapper_type::standard);
keyboard_t proxy_create_wrapper();
static const std::string interface_name;
operator wl_keyboard*() const;
void release();
static constexpr std::uint32_t release_since_version = 3;
bool can_release() const;
std::function<void(keyboard_keymap_format, int, uint32_t)> &on_keymap();
std::function<void(uint32_t, surface_t, array_t)> &on_enter();
std::function<void(uint32_t, surface_t)> &on_leave();
std::function<void(uint32_t, uint32_t, uint32_t, keyboard_key_state)> &on_key();
std::function<void(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t)> &on_modifiers();
std::function<void(int32_t, int32_t)> &on_repeat_info();
};
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 proxy_t
{
private:
struct events_t : public detail::events_base_t
{
std::function<void(uint32_t, uint32_t, surface_t, int32_t, double, double)> down;
std::function<void(uint32_t, uint32_t, int32_t)> up;
std::function<void(uint32_t, int32_t, double, double)> motion;
std::function<void()> frame;
std::function<void()> cancel;
std::function<void(int32_t, double, double)> shape;
std::function<void(int32_t, double)> orientation;
};
static int dispatcher(uint32_t opcode, const std::vector<detail::any>& args, const std::shared_ptr<detail::events_base_t>& e);
touch_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/);
public:
touch_t();
explicit touch_t(const proxy_t &proxy);
touch_t(wl_touch *p, wrapper_type t = wrapper_type::standard);
touch_t proxy_create_wrapper();
static const std::string interface_name;
operator wl_touch*() const;
void release();
static constexpr std::uint32_t release_since_version = 3;
bool can_release() const;
std::function<void(uint32_t, uint32_t, surface_t, int32_t, double, double)> &on_down();
std::function<void(uint32_t, uint32_t, int32_t)> &on_up();
std::function<void(uint32_t, int32_t, double, double)> &on_motion();
std::function<void()> &on_frame();
std::function<void()> &on_cancel();
std::function<void(int32_t, double, double)> &on_shape();
std::function<void(int32_t, double)> &on_orientation();
};
class output_t : public proxy_t
{
private:
struct events_t : public detail::events_base_t
{
std::function<void(int32_t, int32_t, int32_t, int32_t, output_subpixel, std::string, std::string, output_transform)> geometry;
std::function<void(output_mode, int32_t, int32_t, int32_t)> mode;
std::function<void()> done;
std::function<void(int32_t)> scale;
std::function<void(std::string)> name;
std::function<void(std::string)> description;
};
static int dispatcher(uint32_t opcode, const std::vector<detail::any>& args, const std::shared_ptr<detail::events_base_t>& e);
output_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/);
public:
output_t();
explicit output_t(const proxy_t &proxy);
output_t(wl_output *p, wrapper_type t = wrapper_type::standard);
output_t proxy_create_wrapper();
static const std::string interface_name;
operator wl_output*() const;
void release();
static constexpr std::uint32_t release_since_version = 3;
bool can_release() const;
std::function<void(int32_t, int32_t, int32_t, int32_t, output_subpixel, std::string, std::string, output_transform)> &on_geometry();
std::function<void(output_mode, int32_t, int32_t, int32_t)> &on_mode();
std::function<void()> &on_done();
std::function<void(int32_t)> &on_scale();
std::function<void(std::string)> &on_name();
std::function<void(std::string)> &on_description();
};
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 proxy_t
{
private:
struct events_t : public detail::events_base_t
{
};
static int dispatcher(uint32_t opcode, const std::vector<detail::any>& args, const std::shared_ptr<detail::events_base_t>& e);
region_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/);
public:
region_t();
explicit region_t(const proxy_t &proxy);
region_t(wl_region *p, wrapper_type t = wrapper_type::standard);
region_t proxy_create_wrapper();
static const std::string interface_name;
operator wl_region*() const;
void add(int32_t x, int32_t y, int32_t width, int32_t height);
static constexpr std::uint32_t add_since_version = 1;
void subtract(int32_t x, int32_t y, int32_t width, int32_t height);
static constexpr std::uint32_t subtract_since_version = 1;
};
class subcompositor_t : public proxy_t
{
private:
struct events_t : public detail::events_base_t
{
};
static int dispatcher(uint32_t opcode, const std::vector<detail::any>& args, const std::shared_ptr<detail::events_base_t>& e);
subcompositor_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/);
public:
subcompositor_t();
explicit subcompositor_t(const proxy_t &proxy);
subcompositor_t(wl_subcompositor *p, wrapper_type t = wrapper_type::standard);
subcompositor_t proxy_create_wrapper();
static const std::string interface_name;
operator wl_subcompositor*() const;
subsurface_t get_subsurface(surface_t const& surface, surface_t const& parent);
static constexpr std::uint32_t get_subsurface_since_version = 1;
};
enum class subcompositor_error : uint32_t
{
bad_surface = 0
};
class subsurface_t : public proxy_t
{
private:
struct events_t : public detail::events_base_t
{
};
static int dispatcher(uint32_t opcode, const std::vector<detail::any>& args, const std::shared_ptr<detail::events_base_t>& e);
subsurface_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/);
public:
subsurface_t();
explicit subsurface_t(const proxy_t &proxy);
subsurface_t(wl_subsurface *p, wrapper_type t = wrapper_type::standard);
subsurface_t proxy_create_wrapper();
static const std::string interface_name;
operator wl_subsurface*() const;
void set_position(int32_t x, int32_t y);
static constexpr std::uint32_t set_position_since_version = 1;
void place_above(surface_t const& sibling);
static constexpr std::uint32_t place_above_since_version = 1;
void place_below(surface_t const& sibling);
static constexpr std::uint32_t place_below_since_version = 1;
void set_sync();
static constexpr std::uint32_t set_sync_since_version = 1;
void set_desync();
static constexpr std::uint32_t set_desync_since_version = 1;
};
enum class subsurface_error : uint32_t
{
bad_surface = 0
};
}
wayland::buffer_t
content for a wl_surface
Definition wayland-client-protocol.hpp:706
wayland::buffer_t::on_release
std::function< void()> & on_release()
compositor releases buffer
Definition wayland-client-protocol.cpp:1960
wayland::callback_t
callback object
Definition wayland-client-protocol.hpp:212
wayland::callback_t::on_done
std::function< void(uint32_t)> & on_done()
done event
Definition wayland-client-protocol.cpp:1680
wayland::compositor_t
the compositor singleton
Definition wayland-client-protocol.hpp:253
wayland::compositor_t::create_region
region_t create_region()
create new region
Definition wayland-client-protocol.cpp:1753
wayland::compositor_t::create_surface_since_version
static constexpr std::uint32_t create_surface_since_version
Minimum protocol version required for the create_surface function.
Definition wayland-client-protocol.hpp:284
wayland::compositor_t::create_surface
surface_t create_surface()
create new surface
Definition wayland-client-protocol.cpp:1746
wayland::compositor_t::create_region_since_version
static constexpr std::uint32_t create_region_since_version
Minimum protocol version required for the create_region function.
Definition wayland-client-protocol.hpp:296
wayland::data_device_manager_t
data transfer interface
Definition wayland-client-protocol.hpp:1420
wayland::data_device_manager_t::create_data_source
data_source_t create_data_source()
create a new data source
Definition wayland-client-protocol.cpp:2401
wayland::data_device_manager_t::get_data_device
data_device_t get_data_device(seat_t const &seat)
create a new data device
Definition wayland-client-protocol.cpp:2408
wayland::data_device_manager_t::get_data_device_since_version
static constexpr std::uint32_t get_data_device_since_version
Minimum protocol version required for the get_data_device function.
Definition wayland-client-protocol.hpp:1464
wayland::data_device_manager_t::create_data_source_since_version
static constexpr std::uint32_t create_data_source_since_version
Minimum protocol version required for the create_data_source function.
Definition wayland-client-protocol.hpp:1451
wayland::data_device_t
data transfer device
Definition wayland-client-protocol.hpp:1203
wayland::data_device_t::can_release
bool can_release() const
Check whether the release function is available with the currently bound version of the protocol.
Definition wayland-client-protocol.cpp:2288
wayland::data_device_t::release_since_version
static constexpr std::uint32_t release_since_version
Minimum protocol version required for the release function.
Definition wayland-client-protocol.hpp:1297
wayland::data_device_t::on_motion
std::function< void(uint32_t, double, double)> & on_motion()
drag-and-drop session motion
Definition wayland-client-protocol.cpp:2309
wayland::data_device_t::on_leave
std::function< void()> & on_leave()
end drag-and-drop session
Definition wayland-client-protocol.cpp:2304
wayland::data_device_t::on_selection
std::function< void(data_offer_t)> & on_selection()
advertise new selection
Definition wayland-client-protocol.cpp:2319
wayland::data_device_t::release
void release()
destroy data device
Definition wayland-client-protocol.cpp:2283
wayland::data_device_t::on_drop
std::function< void()> & on_drop()
end drag-and-drop session successfully
Definition wayland-client-protocol.cpp:2314
wayland::data_device_t::set_selection
void set_selection(data_source_t const &source, uint32_t serial)
copy data to the selection
Definition wayland-client-protocol.cpp:2277
wayland::data_device_t::start_drag
void start_drag(data_source_t const &source, surface_t const &origin, surface_t const &icon, uint32_t serial)
start drag-and-drop operation
Definition wayland-client-protocol.cpp:2271
wayland::data_device_t::set_selection_since_version
static constexpr std::uint32_t set_selection_since_version
Minimum protocol version required for the set_selection function.
Definition wayland-client-protocol.hpp:1286
wayland::data_device_t::start_drag_since_version
static constexpr std::uint32_t start_drag_since_version
Minimum protocol version required for the start_drag function.
Definition wayland-client-protocol.hpp:1270
wayland::data_device_t::on_enter
std::function< void(uint32_t, surface_t, double, double, data_offer_t)> & on_enter()
initiate drag-and-drop session
Definition wayland-client-protocol.cpp:2299
wayland::data_device_t::on_data_offer
std::function< void(data_offer_t)> & on_data_offer()
introduce a new wl_data_offer
Definition wayland-client-protocol.cpp:2294
wayland::data_offer_t
offer to transfer data
Definition wayland-client-protocol.hpp:760
wayland::data_offer_t::on_offer
std::function< void(std::string)> & on_offer()
advertise offered mime type
Definition wayland-client-protocol.cpp:2062
wayland::data_offer_t::set_actions
void set_actions(data_device_manager_dnd_action const &dnd_actions, data_device_manager_dnd_action const &preferred_action)
set the available/preferred drag-and-drop actions
Definition wayland-client-protocol.cpp:2051
wayland::data_offer_t::on_action
std::function< void(data_device_manager_dnd_action)> & on_action()
notify the selected action
Definition wayland-client-protocol.cpp:2072
wayland::data_offer_t::finish_since_version
static constexpr std::uint32_t finish_since_version
Minimum protocol version required for the finish function.
Definition wayland-client-protocol.hpp:859
wayland::data_offer_t::can_finish
bool can_finish() const
Check whether the finish function is available with the currently bound version of the protocol.
Definition wayland-client-protocol.cpp:2045
wayland::data_offer_t::receive
void receive(std::string const &mime_type, int fd)
request that the data is transferred
Definition wayland-client-protocol.cpp:2034
wayland::data_offer_t::receive_since_version
static constexpr std::uint32_t receive_since_version
Minimum protocol version required for the receive function.
Definition wayland-client-protocol.hpp:835
wayland::data_offer_t::set_actions_since_version
static constexpr std::uint32_t set_actions_since_version
Minimum protocol version required for the set_actions function.
Definition wayland-client-protocol.hpp:907
wayland::data_offer_t::on_source_actions
std::function< void(data_device_manager_dnd_action)> & on_source_actions()
notify the source-side available actions
Definition wayland-client-protocol.cpp:2067
wayland::data_offer_t::can_set_actions
bool can_set_actions() const
Check whether the set_actions function is available with the currently bound version of the protocol.
Definition wayland-client-protocol.cpp:2056
wayland::data_offer_t::accept_since_version
static constexpr std::uint32_t accept_since_version
Minimum protocol version required for the accept function.
Definition wayland-client-protocol.hpp:808
wayland::data_offer_t::accept
void accept(uint32_t serial, std::string const &mime_type)
accept one of the offered mime types
Definition wayland-client-protocol.cpp:2028
wayland::data_offer_t::finish
void finish()
the offer will no longer be used
Definition wayland-client-protocol.cpp:2040
wayland::data_source_t
offer to transfer data
Definition wayland-client-protocol.hpp:1002
wayland::data_source_t::on_cancelled
std::function< void()> & on_cancelled()
selection was cancelled
Definition wayland-client-protocol.cpp:2174
wayland::data_source_t::set_actions_since_version
static constexpr std::uint32_t set_actions_since_version
Minimum protocol version required for the set_actions function.
Definition wayland-client-protocol.hpp:1065
wayland::data_source_t::offer_since_version
static constexpr std::uint32_t offer_since_version
Minimum protocol version required for the offer function.
Definition wayland-client-protocol.hpp:1041
wayland::data_source_t::on_dnd_finished
std::function< void()> & on_dnd_finished()
the drag-and-drop operation concluded
Definition wayland-client-protocol.cpp:2184
wayland::data_source_t::on_send
std::function< void(std::string, int)> & on_send()
send the data
Definition wayland-client-protocol.cpp:2169
wayland::data_source_t::on_dnd_drop_performed
std::function< void()> & on_dnd_drop_performed()
the drag-and-drop operation physically finished
Definition wayland-client-protocol.cpp:2179
wayland::data_source_t::offer
void offer(std::string const &mime_type)
add an offered mime type
Definition wayland-client-protocol.cpp:2147
wayland::data_source_t::on_action
std::function< void(data_device_manager_dnd_action)> & on_action()
notify the selected action
Definition wayland-client-protocol.cpp:2189
wayland::data_source_t::on_target
std::function< void(std::string)> & on_target()
a target accepts an offered mime type
Definition wayland-client-protocol.cpp:2164
wayland::data_source_t::set_actions
void set_actions(data_device_manager_dnd_action const &dnd_actions)
set the available drag-and-drop actions
Definition wayland-client-protocol.cpp:2153
wayland::data_source_t::can_set_actions
bool can_set_actions() const
Check whether the set_actions function is available with the currently bound version of the protocol.
Definition wayland-client-protocol.cpp:2158
wayland::keyboard_t
keyboard input device
Definition wayland-client-protocol.hpp:3117
wayland::keyboard_t::release_since_version
static constexpr std::uint32_t release_since_version
Minimum protocol version required for the release function.
Definition wayland-client-protocol.hpp:3151
wayland::keyboard_t::on_modifiers
std::function< void(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t)> & on_modifiers()
modifier and group state
Definition wayland-client-protocol.cpp:3150
wayland::keyboard_t::can_release
bool can_release() const
Check whether the release function is available with the currently bound version of the protocol.
Definition wayland-client-protocol.cpp:3124
wayland::keyboard_t::on_enter
std::function< void(uint32_t, surface_t, array_t)> & on_enter()
enter event
Definition wayland-client-protocol.cpp:3135
wayland::keyboard_t::on_keymap
std::function< void(keyboard_keymap_format, int, uint32_t)> & on_keymap()
keyboard mapping
Definition wayland-client-protocol.cpp:3130
wayland::keyboard_t::on_leave
std::function< void(uint32_t, surface_t)> & on_leave()
leave event
Definition wayland-client-protocol.cpp:3140
wayland::keyboard_t::on_repeat_info
std::function< void(int32_t, int32_t)> & on_repeat_info()
repeat rate and delay
Definition wayland-client-protocol.cpp:3155
wayland::keyboard_t::release
void release()
release the keyboard object
Definition wayland-client-protocol.cpp:3119
wayland::keyboard_t::on_key
std::function< void(uint32_t, uint32_t, uint32_t, keyboard_key_state)> & on_key()
key event
Definition wayland-client-protocol.cpp:3145
wayland::output_t
compositor output region
Definition wayland-client-protocol.hpp:3484
wayland::output_t::on_name
std::function< void(std::string)> & on_name()
name of this output
Definition wayland-client-protocol.cpp:3394
wayland::output_t::can_release
bool can_release() const
Check whether the release function is available with the currently bound version of the protocol.
Definition wayland-client-protocol.cpp:3368
wayland::output_t::on_scale
std::function< void(int32_t)> & on_scale()
output scaling properties
Definition wayland-client-protocol.cpp:3389
wayland::output_t::on_description
std::function< void(std::string)> & on_description()
human-readable description of this output
Definition wayland-client-protocol.cpp:3399
wayland::output_t::on_done
std::function< void()> & on_done()
sent all information about output
Definition wayland-client-protocol.cpp:3384
wayland::output_t::release
void release()
release the output object
Definition wayland-client-protocol.cpp:3363
wayland::output_t::on_geometry
std::function< void(int32_t, int32_t, int32_t, int32_t, output_subpixel, std::string, std::string, output_transform)> & on_geometry()
properties of the output
Definition wayland-client-protocol.cpp:3374
wayland::output_t::release_since_version
static constexpr std::uint32_t release_since_version
Minimum protocol version required for the release function.
Definition wayland-client-protocol.hpp:3521
wayland::output_t::on_mode
std::function< void(output_mode, int32_t, int32_t, int32_t)> & on_mode()
advertise available modes for the output
Definition wayland-client-protocol.cpp:3379
wayland::pointer_t
pointer input device
Definition wayland-client-protocol.hpp:2689
wayland::pointer_t::on_enter
std::function< void(uint32_t, surface_t, double, double)> & on_enter()
enter event
Definition wayland-client-protocol.cpp:2977
wayland::pointer_t::on_axis
std::function< void(uint32_t, pointer_axis, double)> & on_axis()
axis event
Definition wayland-client-protocol.cpp:2997
wayland::pointer_t::on_button
std::function< void(uint32_t, uint32_t, uint32_t, pointer_button_state)> & on_button()
pointer button event
Definition wayland-client-protocol.cpp:2992
wayland::pointer_t::on_axis_value120
std::function< void(pointer_axis, int32_t)> & on_axis_value120()
axis high-resolution scroll event
Definition wayland-client-protocol.cpp:3022
wayland::pointer_t::on_leave
std::function< void(uint32_t, surface_t)> & on_leave()
leave event
Definition wayland-client-protocol.cpp:2982
wayland::pointer_t::release
void release()
release the pointer object
Definition wayland-client-protocol.cpp:2966
wayland::pointer_t::set_cursor_since_version
static constexpr std::uint32_t set_cursor_since_version
Minimum protocol version required for the set_cursor function.
Definition wayland-client-protocol.hpp:2767
wayland::pointer_t::on_axis_discrete
std::function< void(pointer_axis, int32_t)> & on_axis_discrete()
axis click event
Definition wayland-client-protocol.cpp:3017
wayland::pointer_t::on_frame
std::function< void()> & on_frame()
end of a pointer event sequence
Definition wayland-client-protocol.cpp:3002
wayland::pointer_t::can_release
bool can_release() const
Check whether the release function is available with the currently bound version of the protocol.
Definition wayland-client-protocol.cpp:2971
wayland::pointer_t::release_since_version
static constexpr std::uint32_t release_since_version
Minimum protocol version required for the release function.
Definition wayland-client-protocol.hpp:2782
wayland::pointer_t::on_axis_source
std::function< void(pointer_axis_source)> & on_axis_source()
axis source event
Definition wayland-client-protocol.cpp:3007
wayland::pointer_t::set_cursor
void set_cursor(uint32_t serial, surface_t const &surface, int32_t hotspot_x, int32_t hotspot_y)
set the pointer surface
Definition wayland-client-protocol.cpp:2960
wayland::pointer_t::on_axis_stop
std::function< void(uint32_t, pointer_axis)> & on_axis_stop()
axis stop event
Definition wayland-client-protocol.cpp:3012
wayland::pointer_t::on_motion
std::function< void(uint32_t, double, double)> & on_motion()
pointer motion event
Definition wayland-client-protocol.cpp:2987
wayland::proxy_t
Represents a protocol object on the client side.
Definition wayland-client.hpp:110
wayland::proxy_t::wrapper_type
wrapper_type
Definition wayland-client.hpp:117
wayland::proxy_t::wrapper_type::standard
@ standard
wayland::region_t
region interface
Definition wayland-client-protocol.hpp:3786
wayland::region_t::subtract_since_version
static constexpr std::uint32_t subtract_since_version
Minimum protocol version required for the subtract function.
Definition wayland-client-protocol.hpp:3835
wayland::region_t::add_since_version
static constexpr std::uint32_t add_since_version
Minimum protocol version required for the add function.
Definition wayland-client-protocol.hpp:3820
wayland::region_t::add
void add(int32_t x, int32_t y, int32_t width, int32_t height)
add rectangle to region
Definition wayland-client-protocol.cpp:3495
wayland::region_t::subtract
void subtract(int32_t x, int32_t y, int32_t width, int32_t height)
subtract rectangle from region
Definition wayland-client-protocol.cpp:3501
wayland::registry_t
global registry object
Definition wayland-client-protocol.hpp:132
wayland::registry_t::bind_since_version
static constexpr std::uint32_t bind_since_version
Minimum protocol version required for the bind function.
Definition wayland-client-protocol.hpp:169
wayland::registry_t::on_global
std::function< void(uint32_t, std::string, uint32_t)> & on_global()
announce global object
Definition wayland-client-protocol.cpp:1606
wayland::registry_t::bind
proxy_t bind(uint32_t name, proxy_t &interface, uint32_t version)
bind an object to the display
Definition wayland-client-protocol.cpp:1598
wayland::registry_t::on_global_remove
std::function< void(uint32_t)> & on_global_remove()
announce removal of global object
Definition wayland-client-protocol.cpp:1611
wayland::seat_t
group of input devices
Definition wayland-client-protocol.hpp:2491
wayland::seat_t::get_pointer_since_version
static constexpr std::uint32_t get_pointer_since_version
Minimum protocol version required for the get_pointer function.
Definition wayland-client-protocol.hpp:2531
wayland::seat_t::get_keyboard_since_version
static constexpr std::uint32_t get_keyboard_since_version
Minimum protocol version required for the get_keyboard function.
Definition wayland-client-protocol.hpp:2550
wayland::seat_t::on_name
std::function< void(std::string)> & on_name()
unique identifier for this seat
Definition wayland-client-protocol.cpp:2886
wayland::seat_t::get_touch
touch_t get_touch()
return touch object
Definition wayland-client-protocol.cpp:2863
wayland::seat_t::release_since_version
static constexpr std::uint32_t release_since_version
Minimum protocol version required for the release function.
Definition wayland-client-protocol.hpp:2581
wayland::seat_t::get_touch_since_version
static constexpr std::uint32_t get_touch_since_version
Minimum protocol version required for the get_touch function.
Definition wayland-client-protocol.hpp:2569
wayland::seat_t::can_release
bool can_release() const
Check whether the release function is available with the currently bound version of the protocol.
Definition wayland-client-protocol.cpp:2875
wayland::seat_t::get_keyboard
keyboard_t get_keyboard()
return keyboard object
Definition wayland-client-protocol.cpp:2856
wayland::seat_t::get_pointer
pointer_t get_pointer()
return pointer object
Definition wayland-client-protocol.cpp:2849
wayland::seat_t::release
void release()
release the seat object
Definition wayland-client-protocol.cpp:2870
wayland::seat_t::on_capabilities
std::function< void(seat_capability)> & on_capabilities()
seat capabilities changed
Definition wayland-client-protocol.cpp:2881
wayland::shell_surface_t
desktop-style metadata interface
Definition wayland-client-protocol.hpp:1592
wayland::shell_surface_t::set_popup_since_version
static constexpr std::uint32_t set_popup_since_version
Minimum protocol version required for the set_popup function.
Definition wayland-client-protocol.hpp:1777
wayland::shell_surface_t::resize
void resize(seat_t const &seat, uint32_t serial, shell_surface_resize const &edges)
start an interactive resize
Definition wayland-client-protocol.cpp:2548
wayland::shell_surface_t::set_fullscreen_since_version
static constexpr std::uint32_t set_fullscreen_since_version
Minimum protocol version required for the set_fullscreen function.
Definition wayland-client-protocol.hpp:1742
wayland::shell_surface_t::set_fullscreen
void set_fullscreen(shell_surface_fullscreen_method const &method, uint32_t framerate, output_t const &output)
make the surface a fullscreen surface
Definition wayland-client-protocol.cpp:2566
wayland::shell_surface_t::move
void move(seat_t const &seat, uint32_t serial)
start an interactive move
Definition wayland-client-protocol.cpp:2542
wayland::shell_surface_t::set_toplevel_since_version
static constexpr std::uint32_t set_toplevel_since_version
Minimum protocol version required for the set_toplevel function.
Definition wayland-client-protocol.hpp:1675
wayland::shell_surface_t::set_class
void set_class(std::string const &class_)
set surface class
Definition wayland-client-protocol.cpp:2590
wayland::shell_surface_t::set_maximized_since_version
static constexpr std::uint32_t set_maximized_since_version
Minimum protocol version required for the set_maximized function.
Definition wayland-client-protocol.hpp:1806
wayland::shell_surface_t::set_transient_since_version
static constexpr std::uint32_t set_transient_since_version
Minimum protocol version required for the set_transient function.
Definition wayland-client-protocol.hpp:1696
wayland::shell_surface_t::pong_since_version
static constexpr std::uint32_t pong_since_version
Minimum protocol version required for the pong function.
Definition wayland-client-protocol.hpp:1627
wayland::shell_surface_t::set_transient
void set_transient(surface_t const &parent, int32_t x, int32_t y, shell_surface_transient const &flags)
make the surface a transient surface
Definition wayland-client-protocol.cpp:2560
wayland::shell_surface_t::set_toplevel
void set_toplevel()
make the surface a toplevel surface
Definition wayland-client-protocol.cpp:2554
wayland::shell_surface_t::set_class_since_version
static constexpr std::uint32_t set_class_since_version
Minimum protocol version required for the set_class function.
Definition wayland-client-protocol.hpp:1841
wayland::shell_surface_t::on_configure
std::function< void(shell_surface_resize, int32_t, int32_t)> & on_configure()
suggest resize
Definition wayland-client-protocol.cpp:2601
wayland::shell_surface_t::on_ping
std::function< void(uint32_t)> & on_ping()
ping client
Definition wayland-client-protocol.cpp:2596
wayland::shell_surface_t::set_popup
void set_popup(seat_t const &seat, uint32_t serial, surface_t const &parent, int32_t x, int32_t y, shell_surface_transient const &flags)
make the surface a popup surface
Definition wayland-client-protocol.cpp:2572
wayland::shell_surface_t::pong
void pong(uint32_t serial)
respond to a ping event
Definition wayland-client-protocol.cpp:2536
wayland::shell_surface_t::set_title_since_version
static constexpr std::uint32_t set_title_since_version
Minimum protocol version required for the set_title function.
Definition wayland-client-protocol.hpp:1824
wayland::shell_surface_t::resize_since_version
static constexpr std::uint32_t resize_since_version
Minimum protocol version required for the resize function.
Definition wayland-client-protocol.hpp:1662
wayland::shell_surface_t::set_maximized
void set_maximized(output_t const &output)
make the surface a maximized surface
Definition wayland-client-protocol.cpp:2578
wayland::shell_surface_t::move_since_version
static constexpr std::uint32_t move_since_version
Minimum protocol version required for the move function.
Definition wayland-client-protocol.hpp:1644
wayland::shell_surface_t::on_popup_done
std::function< void()> & on_popup_done()
popup interaction is done
Definition wayland-client-protocol.cpp:2606
wayland::shell_surface_t::set_title
void set_title(std::string const &title)
set surface title
Definition wayland-client-protocol.cpp:2584
wayland::shell_t
create desktop-style surfaces
Definition wayland-client-protocol.hpp:1526
wayland::shell_t::get_shell_surface
shell_surface_t get_shell_surface(surface_t const &surface)
create a shell surface from a surface
Definition wayland-client-protocol.cpp:2474
wayland::shell_t::get_shell_surface_since_version
static constexpr std::uint32_t get_shell_surface_since_version
Minimum protocol version required for the get_shell_surface function.
Definition wayland-client-protocol.hpp:1562
wayland::shm_pool_t
a shared memory pool
Definition wayland-client-protocol.hpp:313
wayland::shm_pool_t::resize_since_version
static constexpr std::uint32_t resize_since_version
Minimum protocol version required for the resize function.
Definition wayland-client-protocol.hpp:380
wayland::shm_pool_t::create_buffer_since_version
static constexpr std::uint32_t create_buffer_since_version
Minimum protocol version required for the create_buffer function.
Definition wayland-client-protocol.hpp:359
wayland::shm_pool_t::create_buffer
buffer_t create_buffer(int32_t offset, int32_t width, int32_t height, int32_t stride, shm_format const &format)
create a buffer from the pool
Definition wayland-client-protocol.cpp:1816
wayland::shm_pool_t::resize
void resize(int32_t size)
change the size of the pool mapping
Definition wayland-client-protocol.cpp:1823
wayland::shm_t
shared memory support
Definition wayland-client-protocol.hpp:399
wayland::shm_t::on_format
std::function< void(shm_format)> & on_format()
pixel format description
Definition wayland-client-protocol.cpp:1890
wayland::shm_t::create_pool_since_version
static constexpr std::uint32_t create_pool_since_version
Minimum protocol version required for the create_pool function.
Definition wayland-client-protocol.hpp:437
wayland::shm_t::create_pool
shm_pool_t create_pool(int fd, int32_t size)
create a shm pool
Definition wayland-client-protocol.cpp:1883
wayland::subcompositor_t
sub-surface compositing
Definition wayland-client-protocol.hpp:3864
wayland::subcompositor_t::get_subsurface_since_version
static constexpr std::uint32_t get_subsurface_since_version
Minimum protocol version required for the get_subsurface function.
Definition wayland-client-protocol.hpp:3911
wayland::subcompositor_t::get_subsurface
subsurface_t get_subsurface(surface_t const &surface, surface_t const &parent)
give a surface the role sub-surface
Definition wayland-client-protocol.cpp:3563
wayland::subsurface_t
sub-surface interface to a wl_surface
Definition wayland-client-protocol.hpp:3979
wayland::subsurface_t::set_sync_since_version
static constexpr std::uint32_t set_sync_since_version
Minimum protocol version required for the set_sync function.
Definition wayland-client-protocol.hpp:4088
wayland::subsurface_t::place_below_since_version
static constexpr std::uint32_t place_below_since_version
Minimum protocol version required for the place_below function.
Definition wayland-client-protocol.hpp:4065
wayland::subsurface_t::set_desync
void set_desync()
set sub-surface to desynchronized mode
Definition wayland-client-protocol.cpp:3651
wayland::subsurface_t::place_above_since_version
static constexpr std::uint32_t place_above_since_version
Minimum protocol version required for the place_above function.
Definition wayland-client-protocol.hpp:4052
wayland::subsurface_t::set_sync
void set_sync()
set sub-surface to synchronized mode
Definition wayland-client-protocol.cpp:3645
wayland::subsurface_t::set_position
void set_position(int32_t x, int32_t y)
reposition the sub-surface
Definition wayland-client-protocol.cpp:3627
wayland::subsurface_t::place_below
void place_below(surface_t const &sibling)
restack the sub-surface
Definition wayland-client-protocol.cpp:3639
wayland::subsurface_t::set_desync_since_version
static constexpr std::uint32_t set_desync_since_version
Minimum protocol version required for the set_desync function.
Definition wayland-client-protocol.hpp:4117
wayland::subsurface_t::place_above
void place_above(surface_t const &sibling)
restack the sub-surface
Definition wayland-client-protocol.cpp:3633
wayland::subsurface_t::set_position_since_version
static constexpr std::uint32_t set_position_since_version
Minimum protocol version required for the set_position function.
Definition wayland-client-protocol.hpp:4026
wayland::surface_t
an onscreen surface
Definition wayland-client-protocol.hpp:2005
wayland::surface_t::offset
void offset(int32_t x, int32_t y)
set the surface contents offset
Definition wayland-client-protocol.cpp:2763
wayland::surface_t::can_offset
bool can_offset() const
Check whether the offset function is available with the currently bound version of the protocol.
Definition wayland-client-protocol.cpp:2768
wayland::surface_t::damage_since_version
static constexpr std::uint32_t damage_since_version
Minimum protocol version required for the damage function.
Definition wayland-client-protocol.hpp:2130
wayland::surface_t::on_enter
std::function< void(output_t)> & on_enter()
surface enters an output
Definition wayland-client-protocol.cpp:2774
wayland::surface_t::set_input_region_since_version
static constexpr std::uint32_t set_input_region_since_version
Minimum protocol version required for the set_input_region function.
Definition wayland-client-protocol.hpp:2241
wayland::surface_t::set_buffer_transform
void set_buffer_transform(output_transform const &transform)
sets the buffer transformation
Definition wayland-client-protocol.cpp:2730
wayland::surface_t::set_input_region
void set_input_region(region_t const &region)
set input region
Definition wayland-client-protocol.cpp:2718
wayland::surface_t::commit
void commit()
commit pending surface state
Definition wayland-client-protocol.cpp:2724
wayland::surface_t::attach
void attach(buffer_t const &buffer, int32_t x, int32_t y)
set the surface contents
Definition wayland-client-protocol.cpp:2693
wayland::surface_t::set_buffer_transform_since_version
static constexpr std::uint32_t set_buffer_transform_since_version
Minimum protocol version required for the set_buffer_transform function.
Definition wayland-client-protocol.hpp:2308
wayland::surface_t::set_opaque_region_since_version
static constexpr std::uint32_t set_opaque_region_since_version
Minimum protocol version required for the set_opaque_region function.
Definition wayland-client-protocol.hpp:2208
wayland::surface_t::can_set_buffer_scale
bool can_set_buffer_scale() const
Check whether the set_buffer_scale function is available with the currently bound version of the prot...
Definition wayland-client-protocol.cpp:2746
wayland::surface_t::attach_since_version
static constexpr std::uint32_t attach_since_version
Minimum protocol version required for the attach function.
Definition wayland-client-protocol.hpp:2095
wayland::surface_t::set_buffer_scale
void set_buffer_scale(int32_t scale)
sets the buffer scaling factor
Definition wayland-client-protocol.cpp:2741
wayland::surface_t::offset_since_version
static constexpr std::uint32_t offset_since_version
Minimum protocol version required for the offset function.
Definition wayland-client-protocol.hpp:2427
wayland::surface_t::damage_buffer_since_version
static constexpr std::uint32_t damage_buffer_since_version
Minimum protocol version required for the damage_buffer function.
Definition wayland-client-protocol.hpp:2398
wayland::surface_t::frame
callback_t frame()
request a frame throttling hint
Definition wayland-client-protocol.cpp:2705
wayland::surface_t::damage
void damage(int32_t x, int32_t y, int32_t width, int32_t height)
mark part of the surface damaged
Definition wayland-client-protocol.cpp:2699
wayland::surface_t::frame_since_version
static constexpr std::uint32_t frame_since_version
Minimum protocol version required for the frame function.
Definition wayland-client-protocol.hpp:2173
wayland::surface_t::set_buffer_scale_since_version
static constexpr std::uint32_t set_buffer_scale_since_version
Minimum protocol version required for the set_buffer_scale function.
Definition wayland-client-protocol.hpp:2347
wayland::surface_t::can_damage_buffer
bool can_damage_buffer() const
Check whether the damage_buffer function is available with the currently bound version of the protoco...
Definition wayland-client-protocol.cpp:2757
wayland::surface_t::commit_since_version
static constexpr std::uint32_t commit_since_version
Minimum protocol version required for the commit function.
Definition wayland-client-protocol.hpp:2268
wayland::surface_t::on_leave
std::function< void(output_t)> & on_leave()
surface leaves an output
Definition wayland-client-protocol.cpp:2779
wayland::surface_t::damage_buffer
void damage_buffer(int32_t x, int32_t y, int32_t width, int32_t height)
mark part of the surface damaged using buffer coordinates
Definition wayland-client-protocol.cpp:2752
wayland::surface_t::set_opaque_region
void set_opaque_region(region_t const &region)
set opaque region
Definition wayland-client-protocol.cpp:2712
wayland::surface_t::can_set_buffer_transform
bool can_set_buffer_transform() const
Check whether the set_buffer_transform function is available with the currently bound version of the ...
Definition wayland-client-protocol.cpp:2735
wayland::touch_t
touchscreen input device
Definition wayland-client-protocol.hpp:3298
wayland::touch_t::on_down
std::function< void(uint32_t, uint32_t, surface_t, int32_t, double, double)> & on_down()
touch down event and beginning of a touch sequence
Definition wayland-client-protocol.cpp:3249
wayland::touch_t::on_cancel
std::function< void()> & on_cancel()
touch session cancelled
Definition wayland-client-protocol.cpp:3269
wayland::touch_t::release_since_version
static constexpr std::uint32_t release_since_version
Minimum protocol version required for the release function.
Definition wayland-client-protocol.hpp:3333
wayland::touch_t::on_up
std::function< void(uint32_t, uint32_t, int32_t)> & on_up()
end of a touch event sequence
Definition wayland-client-protocol.cpp:3254
wayland::touch_t::on_motion
std::function< void(uint32_t, int32_t, double, double)> & on_motion()
update of touch point coordinates
Definition wayland-client-protocol.cpp:3259
wayland::touch_t::on_orientation
std::function< void(int32_t, double)> & on_orientation()
update orientation of touch point
Definition wayland-client-protocol.cpp:3279
wayland::touch_t::on_frame
std::function< void()> & on_frame()
end of touch frame event
Definition wayland-client-protocol.cpp:3264
wayland::touch_t::can_release
bool can_release() const
Check whether the release function is available with the currently bound version of the protocol.
Definition wayland-client-protocol.cpp:3243
wayland::touch_t::on_shape
std::function< void(int32_t, double, double)> & on_shape()
update shape of touch point
Definition wayland-client-protocol.cpp:3274
wayland::touch_t::release
void release()
release the touch object
Definition wayland-client-protocol.cpp:3238
wayland::data_device_manager_dnd_action
drag and drop actions
Definition wayland-client-protocol.hpp:1496
wayland::data_device_manager_dnd_action::ask
static const wayland::detail::bitfield< 3, 6 > ask
ask action
Definition wayland-client-protocol.hpp:1508
wayland::data_device_manager_dnd_action::none
static const wayland::detail::bitfield< 3, 6 > none
no action
Definition wayland-client-protocol.hpp:1502
wayland::data_device_manager_dnd_action::move
static const wayland::detail::bitfield< 3, 6 > move
move action
Definition wayland-client-protocol.hpp:1506
wayland::data_device_manager_dnd_action::copy
static const wayland::detail::bitfield< 3, 6 > copy
copy action
Definition wayland-client-protocol.hpp:1504
wayland::output_mode
mode information
Definition wayland-client-protocol.hpp:3765
wayland::output_mode::current
static const wayland::detail::bitfield< 2, 22 > current
indicates this is the current mode
Definition wayland-client-protocol.hpp:3771
wayland::output_mode::preferred
static const wayland::detail::bitfield< 2, 22 > preferred
indicates this is the preferred mode
Definition wayland-client-protocol.hpp:3773
wayland::output_transform
transform from framebuffer to output
Definition wayland-client-protocol.hpp:3735
wayland::output_transform::normal
static const wayland::detail::bitfield< 3, 21 > normal
no transform
Definition wayland-client-protocol.hpp:3741
wayland::output_transform::_270
static const wayland::detail::bitfield< 3, 21 > _270
270 degrees counter-clockwise
Definition wayland-client-protocol.hpp:3747
wayland::output_transform::flipped_180
static const wayland::detail::bitfield< 3, 21 > flipped_180
flip and rotate 180 degrees counter-clockwise
Definition wayland-client-protocol.hpp:3753
wayland::output_transform::_180
static const wayland::detail::bitfield< 3, 21 > _180
180 degrees counter-clockwise
Definition wayland-client-protocol.hpp:3745
wayland::output_transform::flipped_90
static const wayland::detail::bitfield< 3, 21 > flipped_90
flip and rotate 90 degrees counter-clockwise
Definition wayland-client-protocol.hpp:3751
wayland::output_transform::flipped_270
static const wayland::detail::bitfield< 3, 21 > flipped_270
flip and rotate 270 degrees counter-clockwise
Definition wayland-client-protocol.hpp:3755
wayland::output_transform::flipped
static const wayland::detail::bitfield< 3, 21 > flipped
180 degree flip around a vertical axis
Definition wayland-client-protocol.hpp:3749
wayland::output_transform::_90
static const wayland::detail::bitfield< 3, 21 > _90
90 degrees counter-clockwise
Definition wayland-client-protocol.hpp:3743
wayland::seat_capability
seat capability bitmask
Definition wayland-client-protocol.hpp:2651
wayland::seat_capability::touch
static const wayland::detail::bitfield< 3, 12 > touch
the seat has touch devices
Definition wayland-client-protocol.hpp:2661
wayland::seat_capability::keyboard
static const wayland::detail::bitfield< 3, 12 > keyboard
the seat has one or more keyboards
Definition wayland-client-protocol.hpp:2659
wayland::seat_capability::pointer
static const wayland::detail::bitfield< 3, 12 > pointer
the seat has pointer devices
Definition wayland-client-protocol.hpp:2657
wayland::shell_surface_resize
edge values for resizing
Definition wayland-client-protocol.hpp:1898
wayland::shell_surface_resize::bottom
static const wayland::detail::bitfield< 4, 8 > bottom
bottom edge
Definition wayland-client-protocol.hpp:1908
wayland::shell_surface_resize::right
static const wayland::detail::bitfield< 4, 8 > right
right edge
Definition wayland-client-protocol.hpp:1916
wayland::shell_surface_resize::bottom_right
static const wayland::detail::bitfield< 4, 8 > bottom_right
bottom and right edges
Definition wayland-client-protocol.hpp:1920
wayland::shell_surface_resize::top
static const wayland::detail::bitfield< 4, 8 > top
top edge
Definition wayland-client-protocol.hpp:1906
wayland::shell_surface_resize::none
static const wayland::detail::bitfield< 4, 8 > none
no edge
Definition wayland-client-protocol.hpp:1904
wayland::shell_surface_resize::top_left
static const wayland::detail::bitfield< 4, 8 > top_left
top and left edges
Definition wayland-client-protocol.hpp:1912
wayland::shell_surface_resize::top_right
static const wayland::detail::bitfield< 4, 8 > top_right
top and right edges
Definition wayland-client-protocol.hpp:1918
wayland::shell_surface_resize::bottom_left
static const wayland::detail::bitfield< 4, 8 > bottom_left
bottom and left edges
Definition wayland-client-protocol.hpp:1914
wayland::shell_surface_resize::left
static const wayland::detail::bitfield< 4, 8 > left
left edge
Definition wayland-client-protocol.hpp:1910
wayland::shell_surface_transient
details of transient behaviour
Definition wayland-client-protocol.hpp:1930
wayland::shell_surface_transient::inactive
static const wayland::detail::bitfield< 1, 9 > inactive
do not set keyboard focus
Definition wayland-client-protocol.hpp:1936
wayland-client.hpp