// |_| |___/
display::display()
: d(std::unique_ptr<wl_display, void (*)(wl_display *)>(
- wl_display_connect(NULL), wl_display_disconnect)),
+ wl_display_connect(NULL),
+ [](wl_display *d) {
+ logdebug("wl::display %s @ %p", __func__, d);
+ wl_display_disconnect(d);
+ })),
r(std::make_unique<registry>(d.get())) {}
+display::~display() {}
+
bool display::ok() const {
return d.get() != nullptr && wl_display_get_error(d.get()) == 0;
}
}
registry::~registry() {
- wl_registry_destroy(this->proxy);
- this->proxy = nullptr;
+ logdebug("wl::registry %s @ %p", __func__, this->proxy);
}
void registry::add_global_handler(char const *iface, binder bind) {
void layer_opacity(void *data,
struct ivi_controller_layer *ivi_controller_layer,
wl_fixed_t opacity) {
- static_cast<layer *>(data)->opacity(opacity);
+ static_cast<layer *>(data)->opacity(wl_fixed_to_double(opacity));
}
void layer_source_rectangle(void *data,
logdebug("genivi::layer %s @ %p v %i", __func__, this->proxy, visibility);
}
-void layer::opacity(wl_fixed_t opacity) {
- logdebug("genivi::layer %s @ %p o %i", __func__, this->proxy, opacity);
+void layer::opacity(float opacity) {
+ logdebug("genivi::layer %s @ %p o %f", __func__, this->proxy, opacity);
}
void layer::source_rectangle(int32_t x, int32_t y, int32_t width,
void surface_opacity(void *data,
struct ivi_controller_surface *ivi_controller_surface,
wl_fixed_t opacity) {
- static_cast<surface *>(data)->opacity(opacity);
+ static_cast<surface *>(data)->opacity(wl_fixed_to_double(opacity));
}
void surface_source_rectangle(
logdebug("genivi::surface %s @ %p v %i", __func__, this->proxy, visibility);
}
-void surface::opacity(wl_fixed_t opacity) {
- logdebug("genivi::surface %s @ %p o %i", __func__, this->proxy, opacity);
+void surface::opacity(float opacity) {
+ logdebug("genivi::surface %s @ %p o %f", __func__, this->proxy, opacity);
}
void surface::source_rectangle(int32_t x, int32_t y, int32_t width,