aboutsummaryrefslogtreecommitdiffstats
path: root/src/wayland.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wayland.hpp')
-rw-r--r--src/wayland.hpp31
1 files changed, 15 insertions, 16 deletions
diff --git a/src/wayland.hpp b/src/wayland.hpp
index 7e005f1..740a703 100644
--- a/src/wayland.hpp
+++ b/src/wayland.hpp
@@ -136,6 +136,16 @@ struct controller_child {
virtual ~controller_child() {}
};
+struct surface_properties {
+ uint32_t id; // let's just save an ID here too
+ struct rect dst_rect;
+ struct rect src_rect;
+ struct size size;
+ int32_t orientation;
+ int32_t visibility;
+ float opacity;
+};
+
// __
// ___ _ _ _ __ / _| __ _ ___ ___
// / __| | | | '__| |_ / _` |/ __/ _ \
@@ -144,13 +154,6 @@ struct controller_child {
//
struct surface : public wayland_proxy<struct ivi_controller_surface>,
controller_child {
- struct rect dst_rect;
- struct rect src_rect;
- struct size size;
- int32_t orientation;
- int32_t visibility;
- float opacity;
-
surface(surface const &) = delete;
surface &operator=(surface const &) = delete;
surface(uint32_t i, struct controller *c);
@@ -177,13 +180,6 @@ struct surface : public wayland_proxy<struct ivi_controller_surface>,
// |___/
struct layer : public wayland_proxy<struct ivi_controller_layer>,
controller_child {
- struct rect dst_rect;
- struct rect src_rect;
- struct size size;
- int32_t orientation;
- int32_t visibility;
- float opacity;
-
layer(layer const &) = delete;
layer &operator=(layer const &) = delete;
layer(uint32_t i, struct controller *c);
@@ -236,6 +232,8 @@ struct controller : public wayland_proxy<struct ivi_controller> {
typedef std::unordered_map<uint32_t, std::unique_ptr<struct screen>>
screen_map_type;
+ typedef std::unordered_map<uint32_t, struct surface_properties> props_map;
+
// HACK:
// The order of these member is mandatory, as when objects are destroyed
// they will call their parent (that's us right here!) and remove their
@@ -251,14 +249,15 @@ struct controller : public wayland_proxy<struct ivi_controller> {
layer_map_type layers;
screen_map_type screens;
+ props_map sprops;
+ props_map lprops;
+
typedef std::pair<char const *, std::function<void(struct controller *)>>
name_task_pair;
std::vector<name_task_pair> pending;
size output_size;
- void debug_dump_current_status();
-
void add_proxy_to_id_mapping(struct ivi_controller_surface *p, uint32_t id);
void remove_proxy_to_id_mapping(struct ivi_controller_surface *p);
void add_proxy_to_id_mapping(struct ivi_controller_layer *p, uint32_t id);