-static struct wl_output_listener o_listener = {o_geometry, o_mode, o_done,
- o_scale};
-
-static void r_global(void *data, struct wl_registry *r, uint32_t name,
- char const *iface, uint32_t v) {
- struct conn *c = static_cast<conn *>(data);
-
- if (strcmp(iface, "ivi_controller") == 0) {
- c->c = static_cast<ivi_controller *>(
- wl_registry_bind(r, name, &ivi_controller_interface, v));
- ivi_controller_add_listener(c->c, &c_listener, c);
- } else if (strcmp(iface, "wl_output") == 0) {
- auto o = static_cast<wl_output *>(
- wl_registry_bind(r, name, &wl_output_interface, v));
- c->outputs.emplace_back(std::unique_ptr<wl_output, void (*)(wl_output *)>(
- o, wl_output_destroy));
- wl_output_add_listener(o, &o_listener, c);
- } else {
- lognotice("registry @ %p global n %u i %s v %u", r, name, iface, v);