X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fapp.hpp;h=2fe4383be6093992a3992a6166571e13fabb52bf;hb=refs%2Fheads%2Fsandbox%2Fknimitz%2Fset_role_pid_ver;hp=2ee3560f443b198bd2b6259eaeb94ad3d9febffc;hpb=9cfdd8937209e3e47b551e7a188add100cbae2e7;p=apps%2Fagl-service-windowmanager.git diff --git a/src/app.hpp b/src/app.hpp index 2ee3560..2fe4383 100644 --- a/src/app.hpp +++ b/src/app.hpp @@ -33,6 +33,7 @@ #include "wayland_ivi_wm.hpp" #include "hmi-debug.h" #include "request.hpp" +#include "wm_error.hpp" namespace wl { @@ -69,6 +70,8 @@ extern const char kKeyHeightPixel[]; extern const char kKeyWidthMm[]; extern const char kKeyHeightMm[]; +class AppList; + struct id_allocator { unsigned next = 1; @@ -204,7 +207,7 @@ struct App std::vector surface_bg; explicit App(wl::display *d); - ~App() = default; + ~App()/* = default */; App(App const &) = delete; App &operator=(App const &) = delete; @@ -219,6 +222,7 @@ struct App result api_request_surface(char const *appid, char const *drawing_name); char const *api_request_surface(char const *appid, char const *drawing_name, char const *ivi_id); + bool api_set_role(char const *appid, char const *drawing_name, unsigned pid); void api_activate_surface(char const *appid, char const *drawing_name, char const *drawing_area, const reply_func &reply); void api_deactivate_surface(char const *appid, char const *drawing_name, const reply_func &reply); void api_enddraw(char const *appid, char const *drawing_name); @@ -231,6 +235,7 @@ struct App // Events from the compositor we are interested in void surface_created(uint32_t surface_id); void surface_removed(uint32_t surface_id); + void surface_properties(uint32_t surface_id, uint32_t pid); // Do not use this function //static int processTimerHandler(sd_event_source *s, uint64_t usec, void *userdata); @@ -261,7 +266,7 @@ struct App void emit_invisible(char const *label); void emit_visible(char const *label); - bool do_transition(unsigned req_num); + WMError do_transition(unsigned sequence_number); void do_enddraw(unsigned req_num); void process_request(); @@ -281,9 +286,13 @@ struct App // The following function is temporary. // Then will be removed when layermanager is finished void lm_layout_change(const char *drawing_name); - bool lm_layout_change(const struct WMAction &action); - bool lm_release(const struct WMAction &action); + WMError lm_layout_change(const struct WMAction &action); + WMError lm_release(const struct WMAction &action); void lm_enddraw(const char *drawing_name); + + private: + //std::unique_ptr app_list; + //AppList *app_list; }; } // namespace wm