13 std::vector<std::unique_ptr<wl::output>> outputs;
14 std::unique_ptr<genivi::controller> c;
20 this->outputs.clear();
23 int main(int argc, char **argv) {
24 lognotice("WinMan ver. %s", WINMAN_VERSION_STRING);
26 if (!getenv("XDG_RUNTIME_DIR"))
27 fatal("Environment variable XDG_RUNTIME_DIR not set");
29 auto d = std::make_unique<wl::display>();
31 fatal("Could not connect to compositor");
35 d->r->add_global_handler("ivi_controller", [&](wl_registry *r, uint32_t name, uint32_t v) {
36 c.c = std::make_unique<genivi::controller>(r, name, v);
39 d->r->add_global_handler("wl_output", [&](wl_registry *r, uint32_t name, uint32_t v) {
40 c.outputs.emplace_back(std::make_unique<wl::output>(r, name, v));
43 // First level objects
45 // Second level objects
47 // Third level objects
48 /* wl_display_roundtrip(c.d); */
51 fatal("ivi_controller global not available");