summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcus Fritzsch <marcus_fritzsch@mentor.com>2017-06-28 16:33:16 +0200
committerMarcus Fritzsch <marcus_fritzsch@mentor.com>2017-08-08 17:24:00 +0200
commit63c655fab3274e1319b3f52c236178e00452fe89 (patch)
treeaf3373109110b15ee23f663d5137944f0abaa67a
parent2d220fc2257d24c4be7ca7b60ba526b654395220 (diff)
wayland: delete copy ctors and operators
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
-rw-r--r--src/wayland.hpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/wayland.hpp b/src/wayland.hpp
index 2321fff..3516f5e 100644
--- a/src/wayland.hpp
+++ b/src/wayland.hpp
@@ -19,6 +19,8 @@
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));
@@ -45,6 +47,8 @@ struct registry : public wayland_proxy<struct wl_registry> {
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);
@@ -64,6 +68,8 @@ struct display {
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();
@@ -83,6 +89,8 @@ struct output : wayland_proxy<struct wl_output> {
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
@@ -122,6 +130,8 @@ struct controller_child {
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() {}
};
@@ -141,6 +151,8 @@ struct surface : public wayland_proxy<struct ivi_controller_surface>,
int32_t visibility;
float opacity;
+ surface(surface const &) = delete;
+ surface &operator=(surface const &) = delete;
surface(uint32_t i, struct controller *c);
// Requests
@@ -172,6 +184,8 @@ struct layer : public wayland_proxy<struct ivi_controller_layer>,
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);
@@ -199,6 +213,8 @@ struct layer : public wayland_proxy<struct ivi_controller_layer>,
//
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);