- this->display->r.add_global_handler("wl_output", [](wl_registry *r,
- uint32_t name,
- uint32_t v) {
- g_afb_instance->outputs.emplace_back(std::make_unique<wl::output>(r, name, v));
- });
-
- this->display->r.add_global_handler(
- "ivi_controller", [](wl_registry *r, uint32_t name, uint32_t v) {
- g_afb_instance->controller =
- std::make_unique<genivi::controller>(r, name, v);
-
- // XXX: This protocol needs the output, so lets just add our mapping
- // here...
- g_afb_instance->controller->add_proxy_to_id_mapping(
- g_afb_instance->outputs.back()->proxy.get(),
- wl_proxy_get_id(reinterpret_cast<struct wl_proxy *>(
- g_afb_instance->outputs.back()->proxy.get())));
- });
-
- // First level objects
- this->display->roundtrip();
- // Second level objects
- this->display->roundtrip();
- // Third level objects
- this->display->roundtrip();
-
- // Init the app's members
- this->app.display = this->display.get();
- this->app.controller = this->controller.get();
-
- return 0;