Loading...
Searching...
No Matches
wayland-server-protocol-extra.hpp
#pragma once
#include <array>
#include <cstdint>
#include <functional>
#include <memory>
#include <string>
#include <vector>
#include <wayland-server.hpp>
#include <wayland-server-protocol.hpp>
struct wp_presentation;
struct wp_presentation_feedback;
struct wp_viewporter;
struct wp_viewport;
struct xdg_wm_base;
struct xdg_positioner;
struct xdg_surface;
struct xdg_toplevel;
struct xdg_popup;
namespace wayland
{
namespace server
{
class presentation_t;
enum class presentation_error : uint32_t;
class presentation_feedback_t;
struct presentation_feedback_kind;
class viewporter_t;
enum class viewporter_error : uint32_t;
class viewport_t;
enum class viewport_error : uint32_t;
class xdg_wm_base_t;
enum class xdg_wm_base_error : uint32_t;
class xdg_positioner_t;
enum class xdg_positioner_error : uint32_t;
enum class xdg_positioner_anchor : uint32_t;
enum class xdg_positioner_gravity : uint32_t;
struct xdg_positioner_constraint_adjustment;
class xdg_surface_t;
enum class xdg_surface_error : uint32_t;
class xdg_toplevel_t;
enum class xdg_toplevel_error : uint32_t;
struct xdg_toplevel_resize_edge;
enum class xdg_toplevel_state : uint32_t;
class xdg_popup_t;
enum class xdg_popup_error : uint32_t;
namespace detail
{
extern const wl_interface presentation_interface;
extern const wl_interface presentation_feedback_interface;
extern const wl_interface viewporter_interface;
extern const wl_interface viewport_interface;
extern const wl_interface xdg_wm_base_interface;
extern const wl_interface xdg_positioner_interface;
extern const wl_interface xdg_surface_interface;
extern const wl_interface xdg_toplevel_interface;
extern const wl_interface xdg_popup_interface;
}
class presentation_t : public resource_t
{
private:
struct events_t : public resource_t::events_base_t
{
std::function<void()> destroy;
std::function<void(surface_t, presentation_feedback_t)> feedback;
};
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::presentation_interface;
static constexpr const unsigned int max_version = 1;
friend class global_t<presentation_t>;
friend class global_base_t;
public:
presentation_t() = default;
presentation_t(const client_t& client, uint32_t id, int version = 1);
presentation_t(const resource_t &resource);
static const std::string interface_name;
operator wp_presentation*() const;
std::function<void()> &on_destroy();
std::function<void(surface_t, presentation_feedback_t)> &on_feedback();
void clock_id(uint32_t clk_id, bool post = true);
static constexpr std::uint32_t clock_id_since_version = 1;
void post_invalid_timestamp(std::string const& msg);
void post_invalid_flag(std::string const& msg);
};
using global_presentation_t = global_t<presentation_t>;
enum class presentation_error : uint32_t
{
invalid_timestamp = 0,
invalid_flag = 1
};
class presentation_feedback_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::presentation_feedback_interface;
static constexpr const unsigned int max_version = 1;
friend class global_t<presentation_feedback_t>;
friend class global_base_t;
public:
presentation_feedback_t() = default;
presentation_feedback_t(const client_t& client, uint32_t id, int version = 1);
presentation_feedback_t(const resource_t &resource);
static const std::string interface_name;
operator wp_presentation_feedback*() const;
void sync_output(output_t const& output, bool post = true);
static constexpr std::uint32_t sync_output_since_version = 1;
void presented(uint32_t tv_sec_hi, uint32_t tv_sec_lo, uint32_t tv_nsec, uint32_t refresh, uint32_t seq_hi, uint32_t seq_lo, presentation_feedback_kind const& flags, bool post = true);
static constexpr std::uint32_t presented_since_version = 1;
void discarded(bool post = true);
static constexpr std::uint32_t discarded_since_version = 1;
};
using global_presentation_feedback_t = global_t<presentation_feedback_t>;
struct presentation_feedback_kind : public wayland::detail::bitfield<4, 1>
{
presentation_feedback_kind(const wayland::detail::bitfield<4, 1> &b)
: wayland::detail::bitfield<4, 1>(b) {}
presentation_feedback_kind(const uint32_t value)
: wayland::detail::bitfield<4, 1>(value) {}
static const wayland::detail::bitfield<4, 1> vsync;
static const wayland::detail::bitfield<4, 1> hw_clock;
static const wayland::detail::bitfield<4, 1> hw_completion;
static const wayland::detail::bitfield<4, 1> zero_copy;
};
class viewporter_t : public resource_t
{
private:
struct events_t : public resource_t::events_base_t
{
std::function<void()> destroy;
std::function<void(viewport_t, surface_t)> get_viewport;
};
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::viewporter_interface;
static constexpr const unsigned int max_version = 1;
friend class global_t<viewporter_t>;
friend class global_base_t;
public:
viewporter_t() = default;
viewporter_t(const client_t& client, uint32_t id, int version = 1);
viewporter_t(const resource_t &resource);
static const std::string interface_name;
operator wp_viewporter*() const;
std::function<void()> &on_destroy();
std::function<void(viewport_t, surface_t)> &on_get_viewport();
void post_viewport_exists(std::string const& msg);
};
using global_viewporter_t = global_t<viewporter_t>;
enum class viewporter_error : uint32_t
{
viewport_exists = 0
};
class viewport_t : public resource_t
{
private:
struct events_t : public resource_t::events_base_t
{
std::function<void()> destroy;
std::function<void(double, double, double, double)> set_source;
std::function<void(int32_t, int32_t)> set_destination;
};
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::viewport_interface;
static constexpr const unsigned int max_version = 1;
friend class global_t<viewport_t>;
friend class global_base_t;
public:
viewport_t() = default;
viewport_t(const client_t& client, uint32_t id, int version = 1);
viewport_t(const resource_t &resource);
static const std::string interface_name;
operator wp_viewport*() const;
std::function<void()> &on_destroy();
std::function<void(double, double, double, double)> &on_set_source();
std::function<void(int32_t, int32_t)> &on_set_destination();
void post_bad_value(std::string const& msg);
void post_bad_size(std::string const& msg);
void post_out_of_buffer(std::string const& msg);
void post_no_surface(std::string const& msg);
};
using global_viewport_t = global_t<viewport_t>;
enum class viewport_error : uint32_t
{
bad_value = 0,
bad_size = 1,
out_of_buffer = 2,
no_surface = 3
};
class xdg_wm_base_t : public resource_t
{
private:
struct events_t : public resource_t::events_base_t
{
std::function<void()> destroy;
std::function<void(xdg_positioner_t)> create_positioner;
std::function<void(xdg_surface_t, surface_t)> get_xdg_surface;
std::function<void(uint32_t)> pong;
};
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::xdg_wm_base_interface;
static constexpr const unsigned int max_version = 4;
friend class global_t<xdg_wm_base_t>;
friend class global_base_t;
public:
xdg_wm_base_t() = default;
xdg_wm_base_t(const client_t& client, uint32_t id, int version = 4);
xdg_wm_base_t(const resource_t &resource);
static const std::string interface_name;
operator xdg_wm_base*() const;
std::function<void()> &on_destroy();
std::function<void(xdg_positioner_t)> &on_create_positioner();
std::function<void(xdg_surface_t, surface_t)> &on_get_xdg_surface();
std::function<void(uint32_t)> &on_pong();
void ping(uint32_t serial, bool post = true);
static constexpr std::uint32_t ping_since_version = 1;
void post_role(std::string const& msg);
void post_defunct_surfaces(std::string const& msg);
void post_not_the_topmost_popup(std::string const& msg);
void post_invalid_popup_parent(std::string const& msg);
void post_invalid_surface_state(std::string const& msg);
void post_invalid_positioner(std::string const& msg);
};
using global_xdg_wm_base_t = global_t<xdg_wm_base_t>;
enum class xdg_wm_base_error : uint32_t
{
role = 0,
defunct_surfaces = 1,
not_the_topmost_popup = 2,
invalid_popup_parent = 3,
invalid_surface_state = 4,
invalid_positioner = 5
};
class xdg_positioner_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_size;
std::function<void(int32_t, int32_t, int32_t, int32_t)> set_anchor_rect;
std::function<void(xdg_positioner_anchor)> set_anchor;
std::function<void(xdg_positioner_gravity)> set_gravity;
std::function<void(xdg_positioner_constraint_adjustment)> set_constraint_adjustment;
std::function<void(int32_t, int32_t)> set_offset;
std::function<void()> set_reactive;
std::function<void(int32_t, int32_t)> set_parent_size;
std::function<void(uint32_t)> set_parent_configure;
};
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::xdg_positioner_interface;
static constexpr const unsigned int max_version = 4;
friend class global_t<xdg_positioner_t>;
friend class global_base_t;
public:
xdg_positioner_t() = default;
xdg_positioner_t(const client_t& client, uint32_t id, int version = 4);
xdg_positioner_t(const resource_t &resource);
static const std::string interface_name;
operator xdg_positioner*() const;
std::function<void()> &on_destroy();
std::function<void(int32_t, int32_t)> &on_set_size();
std::function<void(int32_t, int32_t, int32_t, int32_t)> &on_set_anchor_rect();
std::function<void(xdg_positioner_anchor)> &on_set_anchor();
std::function<void(xdg_positioner_gravity)> &on_set_gravity();
std::function<void(xdg_positioner_constraint_adjustment)> &on_set_constraint_adjustment();
std::function<void(int32_t, int32_t)> &on_set_offset();
std::function<void()> &on_set_reactive();
std::function<void(int32_t, int32_t)> &on_set_parent_size();
std::function<void(uint32_t)> &on_set_parent_configure();
void post_invalid_input(std::string const& msg);
};
using global_xdg_positioner_t = global_t<xdg_positioner_t>;
enum class xdg_positioner_error : uint32_t
{
invalid_input = 0
};
enum class xdg_positioner_anchor : uint32_t
{
none = 0,
top = 1,
bottom = 2,
left = 3,
right = 4,
top_left = 5,
bottom_left = 6,
top_right = 7,
bottom_right = 8
};
enum class xdg_positioner_gravity : uint32_t
{
none = 0,
top = 1,
bottom = 2,
left = 3,
right = 4,
top_left = 5,
bottom_left = 6,
top_right = 7,
bottom_right = 8
};
struct xdg_positioner_constraint_adjustment : public wayland::detail::bitfield<6, 8>
{
xdg_positioner_constraint_adjustment(const wayland::detail::bitfield<6, 8> &b)
: wayland::detail::bitfield<6, 8>(b) {}
xdg_positioner_constraint_adjustment(const uint32_t value)
: wayland::detail::bitfield<6, 8>(value) {}
static const wayland::detail::bitfield<6, 8> none;
static const wayland::detail::bitfield<6, 8> slide_x;
static const wayland::detail::bitfield<6, 8> slide_y;
static const wayland::detail::bitfield<6, 8> flip_x;
static const wayland::detail::bitfield<6, 8> flip_y;
static const wayland::detail::bitfield<6, 8> resize_x;
static const wayland::detail::bitfield<6, 8> resize_y;
};
class xdg_surface_t : public resource_t
{
private:
struct events_t : public resource_t::events_base_t
{
std::function<void()> destroy;
std::function<void(xdg_toplevel_t)> get_toplevel;
std::function<void(xdg_popup_t, xdg_surface_t, xdg_positioner_t)> get_popup;
std::function<void(int32_t, int32_t, int32_t, int32_t)> set_window_geometry;
std::function<void(uint32_t)> ack_configure;
};
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::xdg_surface_interface;
static constexpr const unsigned int max_version = 4;
friend class global_t<xdg_surface_t>;
friend class global_base_t;
public:
xdg_surface_t() = default;
xdg_surface_t(const client_t& client, uint32_t id, int version = 4);
xdg_surface_t(const resource_t &resource);
static const std::string interface_name;
operator xdg_surface*() const;
std::function<void()> &on_destroy();
std::function<void(xdg_toplevel_t)> &on_get_toplevel();
std::function<void(xdg_popup_t, xdg_surface_t, xdg_positioner_t)> &on_get_popup();
std::function<void(int32_t, int32_t, int32_t, int32_t)> &on_set_window_geometry();
std::function<void(uint32_t)> &on_ack_configure();
void configure(uint32_t serial, bool post = true);
static constexpr std::uint32_t configure_since_version = 1;
void post_not_constructed(std::string const& msg);
void post_already_constructed(std::string const& msg);
void post_unconfigured_buffer(std::string const& msg);
};
using global_xdg_surface_t = global_t<xdg_surface_t>;
enum class xdg_surface_error : uint32_t
{
not_constructed = 1,
already_constructed = 2,
unconfigured_buffer = 3
};
class xdg_toplevel_t : public resource_t
{
private:
struct events_t : public resource_t::events_base_t
{
std::function<void()> destroy;
std::function<void(xdg_toplevel_t)> set_parent;
std::function<void(std::string)> set_title;
std::function<void(std::string)> set_app_id;
std::function<void(seat_t, uint32_t, int32_t, int32_t)> show_window_menu;
std::function<void(seat_t, uint32_t)> move;
std::function<void(seat_t, uint32_t, xdg_toplevel_resize_edge)> resize;
std::function<void(int32_t, int32_t)> set_max_size;
std::function<void(int32_t, int32_t)> set_min_size;
std::function<void()> set_maximized;
std::function<void()> unset_maximized;
std::function<void(output_t)> set_fullscreen;
std::function<void()> unset_fullscreen;
std::function<void()> set_minimized;
};
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::xdg_toplevel_interface;
static constexpr const unsigned int max_version = 4;
friend class global_t<xdg_toplevel_t>;
friend class global_base_t;
public:
xdg_toplevel_t() = default;
xdg_toplevel_t(const client_t& client, uint32_t id, int version = 4);
xdg_toplevel_t(const resource_t &resource);
static const std::string interface_name;
operator xdg_toplevel*() const;
std::function<void()> &on_destroy();
std::function<void(xdg_toplevel_t)> &on_set_parent();
std::function<void(std::string)> &on_set_title();
std::function<void(std::string)> &on_set_app_id();
std::function<void(seat_t, uint32_t, int32_t, int32_t)> &on_show_window_menu();
std::function<void(seat_t, uint32_t)> &on_move();
std::function<void(seat_t, uint32_t, xdg_toplevel_resize_edge)> &on_resize();
std::function<void(int32_t, int32_t)> &on_set_max_size();
std::function<void(int32_t, int32_t)> &on_set_min_size();
std::function<void()> &on_set_maximized();
std::function<void()> &on_unset_maximized();
std::function<void(output_t)> &on_set_fullscreen();
std::function<void()> &on_unset_fullscreen();
std::function<void()> &on_set_minimized();
void configure(int32_t width, int32_t height, array_t const& states, bool post = true);
static constexpr std::uint32_t configure_since_version = 1;
void close(bool post = true);
static constexpr std::uint32_t close_since_version = 1;
void configure_bounds(int32_t width, int32_t height, bool post = true);
static constexpr std::uint32_t configure_bounds_since_version = 4;
bool can_configure_bounds() const;
void post_invalid_resize_edge(std::string const& msg);
};
using global_xdg_toplevel_t = global_t<xdg_toplevel_t>;
enum class xdg_toplevel_error : uint32_t
{
invalid_resize_edge = 0
};
struct xdg_toplevel_resize_edge : public wayland::detail::bitfield<4, 11>
{
xdg_toplevel_resize_edge(const wayland::detail::bitfield<4, 11> &b)
: wayland::detail::bitfield<4, 11>(b) {}
xdg_toplevel_resize_edge(const uint32_t value)
: wayland::detail::bitfield<4, 11>(value) {}
static const wayland::detail::bitfield<4, 11> none;
static const wayland::detail::bitfield<4, 11> top;
static const wayland::detail::bitfield<4, 11> bottom;
static const wayland::detail::bitfield<4, 11> left;
static const wayland::detail::bitfield<4, 11> top_left;
static const wayland::detail::bitfield<4, 11> bottom_left;
static const wayland::detail::bitfield<4, 11> right;
static const wayland::detail::bitfield<4, 11> top_right;
static const wayland::detail::bitfield<4, 11> bottom_right;
};
enum class xdg_toplevel_state : uint32_t
{
maximized = 1,
fullscreen = 2,
resizing = 3,
activated = 4,
tiled_left = 5,
tiled_right = 6,
tiled_top = 7,
tiled_bottom = 8
};
class xdg_popup_t : public resource_t
{
private:
struct events_t : public resource_t::events_base_t
{
std::function<void()> destroy;
std::function<void(seat_t, uint32_t)> grab;
std::function<void(xdg_positioner_t, uint32_t)> reposition;
};
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::xdg_popup_interface;
static constexpr const unsigned int max_version = 4;
friend class global_t<xdg_popup_t>;
friend class global_base_t;
public:
xdg_popup_t() = default;
xdg_popup_t(const client_t& client, uint32_t id, int version = 4);
xdg_popup_t(const resource_t &resource);
static const std::string interface_name;
operator xdg_popup*() const;
std::function<void()> &on_destroy();
std::function<void(seat_t, uint32_t)> &on_grab();
std::function<void(xdg_positioner_t, uint32_t)> &on_reposition();
void configure(int32_t x, int32_t y, 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;
void repositioned(uint32_t token, bool post = true);
static constexpr std::uint32_t repositioned_since_version = 3;
bool can_repositioned() const;
void post_invalid_grab(std::string const& msg);
};
using global_xdg_popup_t = global_t<xdg_popup_t>;
enum class xdg_popup_error : uint32_t
{
invalid_grab = 0
};
}
}
wayland::server::global_base_t
Definition wayland-server.hpp:581
wayland::server::global_t
Definition wayland-server.hpp:626
wayland::server::output_t
compositor output region
Definition wayland-server-protocol.hpp:3707
wayland::server::presentation_feedback_t
presentation time feedback event
Definition wayland-server-protocol-extra.hpp:215
wayland::server::presentation_feedback_t::discarded_since_version
static constexpr std::uint32_t discarded_since_version
Minimum protocol version required for the discarded function.
Definition wayland-server-protocol-extra.hpp:325
wayland::server::presentation_feedback_t::discarded
void discarded(bool post=true)
the content update was not displayed
Definition wayland-server-protocol-extra.cpp:762
wayland::server::presentation_feedback_t::presented
void presented(uint32_t tv_sec_hi, uint32_t tv_sec_lo, uint32_t tv_nsec, uint32_t refresh, uint32_t seq_hi, uint32_t seq_lo, presentation_feedback_kind const &flags, bool post=true)
the content update was displayed
Definition wayland-server-protocol-extra.cpp:757
wayland::server::presentation_feedback_t::presented_since_version
static constexpr std::uint32_t presented_since_version
Minimum protocol version required for the presented function.
Definition wayland-server-protocol-extra.hpp:314
wayland::server::presentation_feedback_t::sync_output_since_version
static constexpr std::uint32_t sync_output_since_version
Minimum protocol version required for the sync_output function.
Definition wayland-server-protocol-extra.hpp:256
wayland::server::presentation_feedback_t::sync_output
void sync_output(output_t const &output, bool post=true)
presentation synchronized to this output
Definition wayland-server-protocol-extra.cpp:752
wayland::server::presentation_t
timed presentation related wl_surface requests
Definition wayland-server-protocol-extra.hpp:81
wayland::server::presentation_t::post_invalid_timestamp
void post_invalid_timestamp(std::string const &msg)
Post error: invalid value in tv_nsec.
Definition wayland-server-protocol-extra.cpp:707
wayland::server::presentation_t::on_feedback
std::function< void(surface_t, presentation_feedback_t)> & on_feedback()
request presentation feedback information
Definition wayland-server-protocol-extra.cpp:696
wayland::server::presentation_t::on_destroy
std::function< void()> & on_destroy()
unbind from the presentation interface
Definition wayland-server-protocol-extra.cpp:690
wayland::server::presentation_t::post_invalid_flag
void post_invalid_flag(std::string const &msg)
Post error: invalid flag.
Definition wayland-server-protocol-extra.cpp:712
wayland::server::presentation_t::clock_id_since_version
static constexpr std::uint32_t clock_id_since_version
Minimum protocol version required for the clock_id function.
Definition wayland-server-protocol-extra.hpp:170
wayland::server::presentation_t::clock_id
void clock_id(uint32_t clk_id, bool post=true)
clock ID for timestamps
Definition wayland-server-protocol-extra.cpp:702
wayland::server::seat_t
group of input devices
Definition wayland-server-protocol.hpp:2610
wayland::server::surface_t
an onscreen surface
Definition wayland-server-protocol.hpp:2139
wayland::server::viewport_t
crop and scale interface to a wl_surface
Definition wayland-server-protocol-extra.hpp:494
wayland::server::viewport_t::post_bad_size
void post_bad_size(std::string const &msg)
Post error: destination size is not integer.
Definition wayland-server-protocol-extra.cpp:871
wayland::server::viewport_t::on_set_destination
std::function< void(int32_t, int32_t)> & on_set_destination()
set the surface size for scaling
Definition wayland-server-protocol-extra.cpp:860
wayland::server::viewport_t::post_no_surface
void post_no_surface(std::string const &msg)
Post error: the wl_surface was destroyed.
Definition wayland-server-protocol-extra.cpp:881
wayland::server::viewport_t::on_destroy
std::function< void()> & on_destroy()
remove scaling and cropping from the surface
Definition wayland-server-protocol-extra.cpp:848
wayland::server::viewport_t::post_bad_value
void post_bad_value(std::string const &msg)
Post error: negative or zero values in width or height.
Definition wayland-server-protocol-extra.cpp:866
wayland::server::viewport_t::post_out_of_buffer
void post_out_of_buffer(std::string const &msg)
Post error: source rectangle extends outside of the content area.
Definition wayland-server-protocol-extra.cpp:876
wayland::server::viewport_t::on_set_source
std::function< void(double, double, double, double)> & on_set_source()
set the source rectangle for cropping
Definition wayland-server-protocol-extra.cpp:854
wayland::server::viewporter_t
surface cropping and scaling
Definition wayland-server-protocol-extra.hpp:363
wayland::server::viewporter_t::on_get_viewport
std::function< void(viewport_t, surface_t)> & on_get_viewport()
extend surface interface for crop and scale
Definition wayland-server-protocol-extra.cpp:802
wayland::server::viewporter_t::on_destroy
std::function< void()> & on_destroy()
unbind from the cropping and scaling interface
Definition wayland-server-protocol-extra.cpp:796
wayland::server::viewporter_t::post_viewport_exists
void post_viewport_exists(std::string const &msg)
Post error: the surface already has a viewport object associated.
Definition wayland-server-protocol-extra.cpp:808
wayland::server::xdg_popup_t
short-lived, popup surfaces for menus
Definition wayland-server-protocol-extra.hpp:1882
wayland::server::xdg_popup_t::on_grab
std::function< void(seat_t, uint32_t)> & on_grab()
make the popup take an explicit grab
Definition wayland-server-protocol-extra.cpp:1449
wayland::server::xdg_popup_t::can_repositioned
bool can_repositioned() const
Check whether the repositioned function is available with the currently bound version of the protocol...
Definition wayland-server-protocol-extra.cpp:1476
wayland::server::xdg_popup_t::configure
void configure(int32_t x, int32_t y, int32_t width, int32_t height, bool post=true)
configure the popup surface
Definition wayland-server-protocol-extra.cpp:1461
wayland::server::xdg_popup_t::on_reposition
std::function< void(xdg_positioner_t, uint32_t)> & on_reposition()
recalculate the popup's location
Definition wayland-server-protocol-extra.cpp:1455
wayland::server::xdg_popup_t::popup_done
void popup_done(bool post=true)
popup interaction is done
Definition wayland-server-protocol-extra.cpp:1466
wayland::server::xdg_popup_t::post_invalid_grab
void post_invalid_grab(std::string const &msg)
Post error: tried to grab after being mapped.
Definition wayland-server-protocol-extra.cpp:1481
wayland::server::xdg_popup_t::repositioned
void repositioned(uint32_t token, bool post=true)
signal the completion of a repositioned request
Definition wayland-server-protocol-extra.cpp:1471
wayland::server::xdg_popup_t::configure_since_version
static constexpr std::uint32_t configure_since_version
Minimum protocol version required for the configure function.
Definition wayland-server-protocol-extra.hpp:2024
wayland::server::xdg_popup_t::repositioned_since_version
static constexpr std::uint32_t repositioned_since_version
Minimum protocol version required for the repositioned function.
Definition wayland-server-protocol-extra.hpp:2063
wayland::server::xdg_popup_t::on_destroy
std::function< void()> & on_destroy()
remove xdg_popup interface
Definition wayland-server-protocol-extra.cpp:1443
wayland::server::xdg_popup_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-extra.hpp:2037
wayland::server::xdg_positioner_t
child surface positioner
Definition wayland-server-protocol-extra.hpp:788
wayland::server::xdg_positioner_t::on_set_gravity
std::function< void(xdg_positioner_gravity)> & on_set_gravity()
set child surface gravity
Definition wayland-server-protocol-extra.cpp:1048
wayland::server::xdg_positioner_t::post_invalid_input
void post_invalid_input(std::string const &msg)
Post error: invalid input provided.
Definition wayland-server-protocol-extra.cpp:1084
wayland::server::xdg_positioner_t::on_set_size
std::function< void(int32_t, int32_t)> & on_set_size()
set the size of the to-be positioned rectangle
Definition wayland-server-protocol-extra.cpp:1030
wayland::server::xdg_positioner_t::on_set_anchor
std::function< void(xdg_positioner_anchor)> & on_set_anchor()
set anchor rectangle anchor
Definition wayland-server-protocol-extra.cpp:1042
wayland::server::xdg_positioner_t::on_destroy
std::function< void()> & on_destroy()
destroy the xdg_positioner object
Definition wayland-server-protocol-extra.cpp:1024
wayland::server::xdg_positioner_t::on_set_constraint_adjustment
std::function< void(xdg_positioner_constraint_adjustment)> & on_set_constraint_adjustment()
set the adjustment to be done when constrained
Definition wayland-server-protocol-extra.cpp:1054
wayland::server::xdg_positioner_t::on_set_offset
std::function< void(int32_t, int32_t)> & on_set_offset()
set surface position offset
Definition wayland-server-protocol-extra.cpp:1060
wayland::server::xdg_positioner_t::on_set_parent_size
std::function< void(int32_t, int32_t)> & on_set_parent_size()
Definition wayland-server-protocol-extra.cpp:1072
wayland::server::xdg_positioner_t::on_set_reactive
std::function< void()> & on_set_reactive()
continuously reconstrain the surface
Definition wayland-server-protocol-extra.cpp:1066
wayland::server::xdg_positioner_t::on_set_parent_configure
std::function< void(uint32_t)> & on_set_parent_configure()
set parent configure this is a response to
Definition wayland-server-protocol-extra.cpp:1078
wayland::server::xdg_positioner_t::on_set_anchor_rect
std::function< void(int32_t, int32_t, int32_t, int32_t)> & on_set_anchor_rect()
set the anchor rectangle within the parent surface
Definition wayland-server-protocol-extra.cpp:1036
wayland::server::xdg_surface_t
desktop user interface surface base interface
Definition wayland-server-protocol-extra.hpp:1095
wayland::server::xdg_surface_t::on_destroy
std::function< void()> & on_destroy()
destroy the xdg_surface
Definition wayland-server-protocol-extra.cpp:1158
wayland::server::xdg_surface_t::post_not_constructed
void post_not_constructed(std::string const &msg)
Post error:
Definition wayland-server-protocol-extra.cpp:1193
wayland::server::xdg_surface_t::post_already_constructed
void post_already_constructed(std::string const &msg)
Post error:
Definition wayland-server-protocol-extra.cpp:1198
wayland::server::xdg_surface_t::on_get_toplevel
std::function< void(xdg_toplevel_t)> & on_get_toplevel()
assign the xdg_toplevel surface role
Definition wayland-server-protocol-extra.cpp:1164
wayland::server::xdg_surface_t::post_unconfigured_buffer
void post_unconfigured_buffer(std::string const &msg)
Post error:
Definition wayland-server-protocol-extra.cpp:1203
wayland::server::xdg_surface_t::configure
void configure(uint32_t serial, bool post=true)
suggest a surface change
Definition wayland-server-protocol-extra.cpp:1188
wayland::server::xdg_surface_t::on_set_window_geometry
std::function< void(int32_t, int32_t, int32_t, int32_t)> & on_set_window_geometry()
set the new window geometry
Definition wayland-server-protocol-extra.cpp:1176
wayland::server::xdg_surface_t::on_ack_configure
std::function< void(uint32_t)> & on_ack_configure()
ack a configure event
Definition wayland-server-protocol-extra.cpp:1182
wayland::server::xdg_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-extra.hpp:1251
wayland::server::xdg_surface_t::on_get_popup
std::function< void(xdg_popup_t, xdg_surface_t, xdg_positioner_t)> & on_get_popup()
assign the xdg_popup surface role
Definition wayland-server-protocol-extra.cpp:1170
wayland::server::xdg_toplevel_t
toplevel surface
Definition wayland-server-protocol-extra.hpp:1302
wayland::server::xdg_toplevel_t::on_set_min_size
std::function< void(int32_t, int32_t)> & on_set_min_size()
set the minimum size
Definition wayland-server-protocol-extra.cpp:1300
wayland::server::xdg_toplevel_t::on_show_window_menu
std::function< void(seat_t, uint32_t, int32_t, int32_t)> & on_show_window_menu()
show the window menu
Definition wayland-server-protocol-extra.cpp:1276
wayland::server::xdg_toplevel_t::on_unset_maximized
std::function< void()> & on_unset_maximized()
unmaximize the window
Definition wayland-server-protocol-extra.cpp:1312
wayland::server::xdg_toplevel_t::configure_bounds_since_version
static constexpr std::uint32_t configure_bounds_since_version
Minimum protocol version required for the configure_bounds function.
Definition wayland-server-protocol-extra.hpp:1778
wayland::server::xdg_toplevel_t::close_since_version
static constexpr std::uint32_t close_since_version
Minimum protocol version required for the close function.
Definition wayland-server-protocol-extra.hpp:1751
wayland::server::xdg_toplevel_t::on_unset_fullscreen
std::function< void()> & on_unset_fullscreen()
unset the window as fullscreen
Definition wayland-server-protocol-extra.cpp:1324
wayland::server::xdg_toplevel_t::can_configure_bounds
bool can_configure_bounds() const
Check whether the configure_bounds function is available with the currently bound version of the prot...
Definition wayland-server-protocol-extra.cpp:1351
wayland::server::xdg_toplevel_t::on_set_parent
std::function< void(xdg_toplevel_t)> & on_set_parent()
set the parent of this surface
Definition wayland-server-protocol-extra.cpp:1258
wayland::server::xdg_toplevel_t::on_set_app_id
std::function< void(std::string)> & on_set_app_id()
set application ID
Definition wayland-server-protocol-extra.cpp:1270
wayland::server::xdg_toplevel_t::configure_since_version
static constexpr std::uint32_t configure_since_version
Minimum protocol version required for the configure function.
Definition wayland-server-protocol-extra.hpp:1733
wayland::server::xdg_toplevel_t::on_set_max_size
std::function< void(int32_t, int32_t)> & on_set_max_size()
set the maximum size
Definition wayland-server-protocol-extra.cpp:1294
wayland::server::xdg_toplevel_t::close
void close(bool post=true)
surface wants to be closed
Definition wayland-server-protocol-extra.cpp:1341
wayland::server::xdg_toplevel_t::post_invalid_resize_edge
void post_invalid_resize_edge(std::string const &msg)
Post error: provided value is not a valid variant of the resize_edge enum.
Definition wayland-server-protocol-extra.cpp:1356
wayland::server::xdg_toplevel_t::on_set_title
std::function< void(std::string)> & on_set_title()
set surface title
Definition wayland-server-protocol-extra.cpp:1264
wayland::server::xdg_toplevel_t::on_move
std::function< void(seat_t, uint32_t)> & on_move()
start an interactive move
Definition wayland-server-protocol-extra.cpp:1282
wayland::server::xdg_toplevel_t::on_set_maximized
std::function< void()> & on_set_maximized()
maximize the window
Definition wayland-server-protocol-extra.cpp:1306
wayland::server::xdg_toplevel_t::on_resize
std::function< void(seat_t, uint32_t, xdg_toplevel_resize_edge)> & on_resize()
start an interactive resize
Definition wayland-server-protocol-extra.cpp:1288
wayland::server::xdg_toplevel_t::on_set_fullscreen
std::function< void(output_t)> & on_set_fullscreen()
set the window as fullscreen on an output
Definition wayland-server-protocol-extra.cpp:1318
wayland::server::xdg_toplevel_t::on_set_minimized
std::function< void()> & on_set_minimized()
set the window as minimized
Definition wayland-server-protocol-extra.cpp:1330
wayland::server::xdg_toplevel_t::configure_bounds
void configure_bounds(int32_t width, int32_t height, bool post=true)
recommended window geometry bounds
Definition wayland-server-protocol-extra.cpp:1346
wayland::server::xdg_toplevel_t::configure
void configure(int32_t width, int32_t height, array_t const &states, bool post=true)
suggest a surface change
Definition wayland-server-protocol-extra.cpp:1336
wayland::server::xdg_toplevel_t::on_destroy
std::function< void()> & on_destroy()
destroy the xdg_toplevel
Definition wayland-server-protocol-extra.cpp:1252
wayland::server::xdg_wm_base_t
create desktop-style surfaces
Definition wayland-server-protocol-extra.hpp:615
wayland::server::xdg_wm_base_t::on_destroy
std::function< void()> & on_destroy()
destroy xdg_wm_base
Definition wayland-server-protocol-extra.cpp:924
wayland::server::xdg_wm_base_t::on_pong
std::function< void(uint32_t)> & on_pong()
respond to a ping event
Definition wayland-server-protocol-extra.cpp:942
wayland::server::xdg_wm_base_t::post_invalid_surface_state
void post_invalid_surface_state(std::string const &msg)
Post error: the client provided an invalid surface state.
Definition wayland-server-protocol-extra.cpp:973
wayland::server::xdg_wm_base_t::post_invalid_popup_parent
void post_invalid_popup_parent(std::string const &msg)
Post error: the client specified an invalid popup parent surface.
Definition wayland-server-protocol-extra.cpp:968
wayland::server::xdg_wm_base_t::post_role
void post_role(std::string const &msg)
Post error: given wl_surface has another role.
Definition wayland-server-protocol-extra.cpp:953
wayland::server::xdg_wm_base_t::post_defunct_surfaces
void post_defunct_surfaces(std::string const &msg)
Post error: xdg_wm_base was destroyed before children.
Definition wayland-server-protocol-extra.cpp:958
wayland::server::xdg_wm_base_t::ping
void ping(uint32_t serial, bool post=true)
check if the client is alive
Definition wayland-server-protocol-extra.cpp:948
wayland::server::xdg_wm_base_t::on_create_positioner
std::function< void(xdg_positioner_t)> & on_create_positioner()
create a positioner object
Definition wayland-server-protocol-extra.cpp:930
wayland::server::xdg_wm_base_t::post_invalid_positioner
void post_invalid_positioner(std::string const &msg)
Post error: the client provided an invalid positioner.
Definition wayland-server-protocol-extra.cpp:978
wayland::server::xdg_wm_base_t::on_get_xdg_surface
std::function< void(xdg_surface_t, surface_t)> & on_get_xdg_surface()
create a shell surface from a surface
Definition wayland-server-protocol-extra.cpp:936
wayland::server::xdg_wm_base_t::post_not_the_topmost_popup
void post_not_the_topmost_popup(std::string const &msg)
Post error: the client tried to map or destroy a non-topmost popup.
Definition wayland-server-protocol-extra.cpp:963
wayland::server::xdg_wm_base_t::ping_since_version
static constexpr std::uint32_t ping_since_version
Minimum protocol version required for the ping function.
Definition wayland-server-protocol-extra.hpp:714
wayland::server::presentation_feedback_kind
bitmask of flags in presented event
Definition wayland-server-protocol-extra.hpp:340
wayland::server::xdg_positioner_constraint_adjustment
constraint adjustments
Definition wayland-server-protocol-extra.hpp:1030
wayland::server::xdg_toplevel_resize_edge
edge values for resizing
Definition wayland-server-protocol-extra.hpp:1809
wayland-server.hpp