X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fwayland.hpp;h=59d7adec298881bb410442d737840000154390a8;hb=b00ef7b9c2f495eea7911d874b9f2fb744c87412;hp=61a840dadfc9af526b9fea54394ed9d8e704f250;hpb=074d058a7a483a66af7f8c0b928b321ad483f47c;p=apps%2Fagl-service-windowmanager.git diff --git a/src/wayland.hpp b/src/wayland.hpp index 61a840d..59d7ade 100644 --- a/src/wayland.hpp +++ b/src/wayland.hpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017 Mentor Graphics Development (Deutschland) GmbH + * Copyright (c) 2017 TOYOTA MOTOR CORPORATION * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,12 +26,9 @@ #include #include -// _ _ -// __ ____ _ _ _| | __ _ _ __ __| | _ __ _ __ _____ ___ _ -// \ \ /\ / / _` | | | | |/ _` | '_ \ / _` | | '_ \| '__/ _ \ \/ / | | | -// \ V V / (_| | |_| | | (_| | | | | (_| | | |_) | | | (_) > <| |_| | -// \_/\_/ \__,_|\__, |_|\__,_|_| |_|\__,_|____| .__/|_| \___/_/\_\\__, | -// |___/ |_____|_| |___/ +/** + * @struct wayland_proxy + */ template struct wayland_proxy { std::unique_ptr> proxy; @@ -45,19 +42,14 @@ struct wayland_proxy { static_cast(p), p_del)) {} }; -// _ -// _ __ __ _ _ __ ___ ___ ___ _ __ __ _ ___ ___ __ _| | -// | '_ \ / _` | '_ ` _ \ / _ \/ __| '_ \ / _` |/ __/ _ \ \ \ /\ / / | -// | | | | (_| | | | | | | __/\__ \ |_) | (_| | (_| __/ \ V V /| | -// |_| |_|\__,_|_| |_| |_|\___||___/ .__/ \__,_|\___\___| \_/\_/ |_| -// |_| +/** + * namespace wl + */ namespace wl { -// _ _ -// _ __ ___ __ _(_)___| |_ _ __ _ _ -// | '__/ _ \/ _` | / __| __| '__| | | | -// | | | __/ (_| | \__ \ |_| | | |_| | -// |_| \___|\__, |_|___/\__|_| \__, | -// |___/ |___/ + +/** + * @struct registry + */ struct registry : public wayland_proxy { typedef std::function binder; std::unordered_map bindings; @@ -73,12 +65,9 @@ struct registry : public wayland_proxy { void global_remove(uint32_t name); }; -// _ _ _ -// __| (_)___ _ __ | | __ _ _ _ -// / _` | / __| '_ \| |/ _` | | | | -// | (_| | \__ \ |_) | | (_| | |_| | -// \__,_|_|___/ .__/|_|\__,_|\__, | -// |_| |___/ +/** + * @struct display + */ struct display { std::unique_ptr d; struct registry r; @@ -101,12 +90,9 @@ struct display { } }; -// _ _ -// ___ _ _| |_ _ __ _ _| |_ -// / _ \| | | | __| '_ \| | | | __| -// | (_) | |_| | |_| |_) | |_| | |_ -// \___/ \__,_|\__| .__/ \__,_|\__| -// |_| +/** + * @struct output + */ struct output : wayland_proxy { int width{}; int height{}; @@ -126,18 +112,10 @@ struct output : wayland_proxy { }; } // namespace wl -// _ __ __ _ _ __ ___ ___ ___ _ __ __ _ ___ ___ -// | '_ \ / _` | '_ ` _ \ / _ \/ __| '_ \ / _` |/ __/ _ \ -// | | | | (_| | | | | | | __/\__ \ |_) | (_| | (_| __/ -// |_| |_|\__,_|_| |_| |_|\___||___/ .__/ \__,_|\___\___| -// |_| -// _ _ -// __ _ ___ _ __ (_)_ _(_) -// / _` |/ _ \ '_ \| \ \ / / | -// | (_| | __/ | | | |\ V /| | -// \__, |\___|_| |_|_| \_/ |_| -// |___/ -namespace genivi { +/** + * namespace compositor + */ +namespace compositor { struct size { uint32_t w, h; @@ -176,12 +154,9 @@ struct surface_properties { float opacity; }; -// __ -// ___ _ _ _ __ / _| __ _ ___ ___ -// / __| | | | '__| |_ / _` |/ __/ _ \ -// \__ \ |_| | | | _| (_| | (_| __/ -// |___/\__,_|_| |_| \__,_|\___\___| -// +/** + * @struct surface + */ struct surface : public wayland_proxy, controller_child { surface(surface const &) = delete; @@ -202,12 +177,9 @@ struct surface : public wayland_proxy, void destroy(int32_t destroy_scene_object); }; -// _ -// | | __ _ _ _ ___ _ __ -// | |/ _` | | | |/ _ \ '__| -// | | (_| | |_| | __/ | -// |_|\__,_|\__, |\___|_| -// |___/ +/** + * @struct layer + */ struct layer : public wayland_proxy, controller_child { layer(layer const &) = delete; @@ -231,12 +203,9 @@ struct layer : public wayland_proxy, void set_render_order(std::vector const &ro); }; -// -// ___ ___ _ __ ___ ___ _ __ -// / __|/ __| '__/ _ \/ _ \ '_ \ -// \__ \ (__| | | __/ __/ | | | -// |___/\___|_| \___|\___|_| |_| -// +/** + * @struct screen + */ struct screen : public wayland_proxy, controller_child { screen(screen const &) = delete; @@ -247,12 +216,9 @@ struct screen : public wayland_proxy, void set_render_order(std::vector const &ro); }; -// _ _ _ -// ___ ___ _ __ | |_ _ __ ___ | | | ___ _ __ -// / __/ _ \| '_ \| __| '__/ _ \| | |/ _ \ '__| -// | (_| (_) | | | | |_| | | (_) | | | __/ | -// \___\___/|_| |_|\__|_| \___/|_|_|\___|_| -// +/** + * @struct controller + */ struct controller : public wayland_proxy { // This controller is still missing ivi-input @@ -288,6 +254,8 @@ struct controller : public wayland_proxy { wm::controller_hooks *chooks; + bool is_configured; + void add_proxy_to_id_mapping(struct ivi_controller_surface *p, uint32_t id); void remove_proxy_to_id_mapping(struct ivi_controller_surface *p); void add_proxy_to_id_mapping(struct ivi_controller_layer *p, uint32_t id); @@ -349,6 +317,6 @@ struct controller : public wayland_proxy { void layer_screen(struct layer *l, struct wl_output *screen); void layer_destroyed(struct layer *l); }; -} // namespace genivi +} // namespace compositor #endif // !WM_WAYLAND_HPP