+void layer::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.get(), &wlro);
+}
+
+void controller::layer_visibility(struct layer *l, int32_t visibility) {
+ logdebug("genivi::layer %s @ %p v %i", __func__, this->proxy.get(),
+ visibility);
+ this->lprops[l->id].visibility = visibility;
+}
+
+void controller::layer_opacity(struct layer *l, float opacity) {
+ logdebug("genivi::layer %s @ %p o %f", __func__, this->proxy.get(), opacity);
+ this->lprops[l->id].opacity = opacity;
+}
+
+void controller::layer_source_rectangle(struct layer *l, int32_t x, int32_t y,
+ int32_t width, int32_t height) {
+ logdebug("genivi::layer %s @ %p x %i y %i w %i h %i", __func__,
+ this->proxy.get(), x, y, width, height);
+ this->lprops[l->id].src_rect = rect{width, height, x, y};
+}
+
+void controller::layer_destination_rectangle(struct layer *l, int32_t x,
+ int32_t y, int32_t width,
+ int32_t height) {
+ logdebug("genivi::layer %s @ %p x %i y %i w %i h %i", __func__,
+ this->proxy.get(), x, y, width, height);
+ this->lprops[l->id].dst_rect = rect{width, height, x, y};
+}
+
+void controller::layer_configuration(struct layer *l, int32_t width,
+ int32_t height) {
+ logdebug("genivi::layer %s @ %p w %i h %i", __func__, this->proxy.get(),
+ width, height);
+ this->lprops[l->id].size = size{uint32_t(width), uint32_t(height)};
+}
+
+void controller::layer_orientation(struct layer *l, int32_t orientation) {
+ logdebug("genivi::layer %s @ %p o %i", __func__, this->proxy.get(),
+ orientation);
+ this->lprops[l->id].orientation = orientation;
+}
+
+void controller::layer_screen(struct layer * /*l*/, struct wl_output *screen) {
+ logdebug("genivi::layer %s @ %p s %p", __func__, this->proxy.get(), screen);
+}
+
+void controller::layer_destroyed(struct layer *l) {
+ logdebug("genivi::layer %s @ %p", __func__, this->proxy.get());
+ add_task("remove layer", [l](struct controller *c) {
+ c->lprops.erase(l->id);
+ c->layers.erase(l->id);
+ });