X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fwayland.hpp;h=ce8360f14b9b7a6b1a5cb4e62f7b22bbc38391a4;hb=8e831f9b2e461c94a8ee0e229812bcf2d42ae2a5;hp=c47e2182617774a2a73ecd98588d75a5ad87c3cf;hpb=4bfc9ea5a9a5598aceb4e3e43fd2ade99d789200;p=staging%2Fwindowmanager.git diff --git a/src/wayland.hpp b/src/wayland.hpp index c47e218..ce8360f 100644 --- a/src/wayland.hpp +++ b/src/wayland.hpp @@ -3,11 +3,11 @@ #include "ivi-controller-client-protocol.h" -#include "util.h" +#include "util.hpp" #include -#include #include +#include #include // _ _ @@ -22,10 +22,9 @@ struct wayland_proxy { wayland_proxy(wayland_proxy const &) = delete; wayland_proxy &operator=(wayland_proxy const &) = delete; wayland_proxy(void *p) - : wayland_proxy(p, [](ProxyT *p) { - wl_proxy_destroy(reinterpret_cast(p)); - }) {} - wayland_proxy(void *p, std::function p_del) + : wayland_proxy(p, + reinterpret_cast(wl_proxy_destroy)) {} + wayland_proxy(void *p, std::function &&p_del) : proxy(std::unique_ptr>( static_cast(p), p_del)) {} }; @@ -100,7 +99,7 @@ struct output : wayland_proxy { void done(); void scale(int32_t factor); }; -} +} // namespace wl // _ __ __ _ _ __ ___ ___ ___ _ __ __ _ ___ ___ // | '_ \ / _` | '_ ` _ \ / _ \/ __| '_ \ / _` |/ __/ _ \ @@ -249,6 +248,8 @@ struct controller : public wayland_proxy { size output_size; + void debug_dump_current_status(); + 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); @@ -278,34 +279,34 @@ struct controller : public wayland_proxy { int32_t error_code, char const *error_text); // surface - void surface_visibility(uint32_t id, int32_t visibility); - void surface_opacity(uint32_t id, float opacity); - void surface_source_rectangle(uint32_t id, int32_t x, int32_t y, + void surface_visibility(struct surface *s, int32_t visibility); + void surface_opacity(struct surface *s, float opacity); + void surface_source_rectangle(struct surface *s, int32_t x, int32_t y, int32_t width, int32_t height); - void surface_destination_rectangle(uint32_t id, int32_t x, int32_t y, + void surface_destination_rectangle(struct surface *s, int32_t x, int32_t y, int32_t width, int32_t height); - void surface_configuration(uint32_t id, int32_t width, int32_t height); - void surface_orientation(uint32_t id, int32_t orientation); - void surface_pixelformat(uint32_t id, int32_t pixelformat); - void surface_layer(uint32_t id, struct ivi_controller_layer *layer); - void surface_stats(uint32_t id, uint32_t redraw_count, uint32_t frame_count, - uint32_t update_count, uint32_t pid, + void surface_configuration(struct surface *s, int32_t width, int32_t height); + void surface_orientation(struct surface *s, int32_t orientation); + void surface_pixelformat(struct surface *s, int32_t pixelformat); + void surface_layer(struct surface *s, struct ivi_controller_layer *layer); + void surface_stats(struct surface *s, uint32_t redraw_count, + uint32_t frame_count, uint32_t update_count, uint32_t pid, const char *process_name); - void surface_destroyed(uint32_t id); - void surface_content(uint32_t id, int32_t content_state); + void surface_destroyed(struct surface *s); + void surface_content(struct surface *s, int32_t content_state); // layer - void layer_visibility(uint32_t id, int32_t visibility); - void layer_opacity(uint32_t id, float opacity); - void layer_source_rectangle(uint32_t id, int32_t x, int32_t y, int32_t width, - int32_t height); - void layer_destination_rectangle(uint32_t id, int32_t x, int32_t y, + void layer_visibility(struct layer *l, int32_t visibility); + void layer_opacity(struct layer *l, float opacity); + void layer_source_rectangle(struct layer *l, int32_t x, int32_t y, + int32_t width, int32_t height); + void layer_destination_rectangle(struct layer *l, int32_t x, int32_t y, int32_t width, int32_t height); - void layer_configuration(uint32_t id, int32_t width, int32_t height); - void layer_orientation(uint32_t id, int32_t orientation); - void layer_screen(uint32_t id, struct wl_output *screen); - void layer_destroyed(uint32_t id); + void layer_configuration(struct layer *l, int32_t width, int32_t height); + void layer_orientation(struct layer *l, int32_t orientation); + void layer_screen(struct layer *l, struct wl_output *screen); + void layer_destroyed(struct layer *l); }; -} +} // namespace genivi #endif // !WM_WAYLAND_HPP