summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarcus Fritzsch <marcus_fritzsch@mentor.com>2017-06-23 15:04:37 +0200
committerMarcus Fritzsch <marcus_fritzsch@mentor.com>2017-08-08 17:24:00 +0200
commitb2dac46f817dcb12c180925a52dae5494ea584a3 (patch)
treea16a41d83d9def4772f2ae544d54dcbc201255a7 /src
parent3c59055d6bec8fb5e8a3c582caf31b979665f985 (diff)
wayland: C++ified set_render_order requests for layer and screen
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
Diffstat (limited to 'src')
-rw-r--r--src/wayland.hpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/wayland.hpp b/src/wayland.hpp
index 44f6cb4..da3cc29 100644
--- a/src/wayland.hpp
+++ b/src/wayland.hpp
@@ -257,8 +257,13 @@ struct layer : public wayland_proxy<struct ivi_controller_layer>,
ivi_controller_layer_remove_surface(this->proxy, surface->proxy);
}
- inline void set_render_order(struct wl_array *surfaces) {
- ivi_controller_layer_set_render_order(this->proxy, surfaces);
+ void set_render_order(std::vector<uint32_t> const &ro) {
+ struct wl_array wlro{
+ .size = ro.size() * sizeof(ro[0]),
+ .alloc = ro.capacity() * sizeof(ro[0]),
+ .data = const_cast<void *>(static_cast<void const *>(ro.data()))
+ };
+ ivi_controller_layer_set_render_order(this->proxy, &wlro);
}
};
@@ -276,6 +281,14 @@ struct screen : public wayland_proxy<struct ivi_controller_screen>,
void add_layer(layer *l) {
ivi_controller_screen_add_layer(this->proxy, l->proxy);
}
+ void set_render_order(std::vector<uint32_t> const &ro) {
+ struct wl_array wlro{
+ .size = ro.size() * sizeof(ro[0]),
+ .alloc = ro.capacity() * sizeof(ro[0]),
+ .data = const_cast<void *>(static_cast<void const *>(ro.data()))
+ };
+ ivi_controller_screen_set_render_order(this->proxy, &wlro);
+ }
};
// _ _ _