template <typename ProxyT>
struct wayland_proxy {
std::unique_ptr<ProxyT, std::function<void(ProxyT *)>> proxy;
+ wayland_proxy(wayland_proxy const &) = delete;
+ wayland_proxy &operator=(wayland_proxy const &) = delete;
wayland_proxy(void *p)
: wayland_proxy(p, [](ProxyT *p) {
wl_proxy_destroy(reinterpret_cast<struct wl_proxy *>(p));
typedef std::function<void(struct wl_registry *, uint32_t, uint32_t)> binder;
std::unordered_map<std::string, binder> bindings;
+ registry(registry const &) = delete;
+ registry &operator=(registry const &) = delete;
registry(struct wl_display *d);
void add_global_handler(char const *iface, binder bind);
std::unique_ptr<struct wl_display, void (*)(struct wl_display *)> d;
struct registry r;
+ display(display const &) = delete;
+ display &operator=(display const &) = delete;
display();
bool ok() const;
void roundtrip();
int height{};
int refresh{};
+ output(output const &) = delete;
+ output &operator=(output const &) = delete;
output(struct wl_registry *r, uint32_t name, uint32_t v);
// Events
struct controller *parent;
uint32_t id;
+ controller_child(controller_child const &) = delete;
+ controller_child &operator=(controller_child const &) = delete;
controller_child(struct controller *c, uint32_t i) : parent(c), id(i) {}
virtual ~controller_child() {}
};
int32_t visibility;
float opacity;
+ surface(surface const &) = delete;
+ surface &operator=(surface const &) = delete;
surface(uint32_t i, struct controller *c);
// Requests
int32_t visibility;
float opacity;
+ layer(layer const &) = delete;
+ layer &operator=(layer const &) = delete;
layer(uint32_t i, struct controller *c);
layer(uint32_t i, int32_t w, int32_t h, struct controller *c);
//
struct screen : public wayland_proxy<struct ivi_controller_screen>,
controller_child {
+ screen(screen const &) = delete;
+ screen &operator=(screen const &) = delete;
screen(uint32_t i, struct controller *c, struct ivi_controller_screen *p);
void clear();
void add_layer(layer *l);