Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
- this->display->r.add_global_handler(
- "wl_output", [](wl_registry *r, uint32_t name, uint32_t v) {
- g_app->outputs.emplace_back(std::make_unique<wl::output>(r, name, v));
+ this->display->add_global_handler(
+ "wl_output", [this](wl_registry *r, uint32_t name, uint32_t v) {
+ this->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_app->controller = std::make_unique<genivi::controller>(r, name, v);
+ this->display->add_global_handler(
+ "ivi_controller", [this](wl_registry *r, uint32_t name, uint32_t v) {
+ this->controller = std::make_unique<genivi::controller>(r, name, v);
// XXX: This protocol needs the output, so lets just add our mapping
// here...
// XXX: This protocol needs the output, so lets just add our mapping
// here...
- g_app->controller->add_proxy_to_id_mapping(
- g_app->outputs.back()->proxy.get(),
+ this->controller->add_proxy_to_id_mapping(
+ this->outputs.back()->proxy.get(),
wl_proxy_get_id(reinterpret_cast<struct wl_proxy *>(
wl_proxy_get_id(reinterpret_cast<struct wl_proxy *>(
- g_app->outputs.back()->proxy.get())));
+ this->outputs.back()->proxy.get())));
});
// First level objects
});
// First level objects
void flush();
int get_fd() const;
int get_error();
void flush();
int get_fd() const;
int get_error();
+
+ // Lets just proxy this for the registry
+ inline void add_global_handler(char const *iface, registry::binder bind) {
+ this->r.add_global_handler(iface, bind);
+ }