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