X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fwindow_manager.hpp;h=aa1b4cc6b3048e9a1c0f52cd251b3c84236264e5;hb=741a9924776e40293b91eff00ec91d5a72f5da7f;hp=0fb180534f8ab440dfe6c012cb1f362fa2e0b7b9;hpb=c6f9a9b8468b3746a3dec7ee2a0b7d84ec9fb44a;p=apps%2Fagl-service-windowmanager.git diff --git a/src/window_manager.hpp b/src/window_manager.hpp index 0fb1805..aa1b4cc 100644 --- a/src/window_manager.hpp +++ b/src/window_manager.hpp @@ -25,6 +25,7 @@ #include "layers.hpp" #include "layout.hpp" #include "wayland_ivi_wm.hpp" +#include "pm_wrapper.hpp" #include "hmi-debug.h" #include "request.hpp" #include "wm_error.hpp" @@ -65,6 +66,7 @@ extern const char kKeyWidthPixel[]; extern const char kKeyHeightPixel[]; extern const char kKeyWidthMm[]; extern const char kKeyHeightMm[]; +extern const char kKeyScale[]; extern const char kKeyIds[]; struct id_allocator @@ -208,13 +210,14 @@ class WindowManager int dispatch_pending_events(); void set_pending_events(); - 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); - 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); + result api_request_surface(char const *appid, char const *role); + char const *api_request_surface(char const *appid, char const *role, char const *ivi_id); + bool api_set_role(char const *appid, char const *role, unsigned pid); + void api_activate_surface(char const *appid, char const *role, char const *drawing_area, const reply_func &reply); + void api_deactivate_surface(char const *appid, char const *role, const reply_func &reply); + void api_enddraw(char const *appid, char const *role); result api_get_display_info(); - result api_get_area_info(char const *drawing_name); + result api_get_area_info(char const *role); void api_ping(); void send_event(char const *evname, char const *label); void send_event(char const *evname, char const *label, char const *area, int x, int y, int w, int h); @@ -222,11 +225,16 @@ class WindowManager // 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); void removeClient(const std::string &appid); void exceptionProcessForTransition(); + const char* convertRoleOldToNew(char const *role); + // Do not use this function void timerHandler(); + void startTransitionWrapper(std::vector &actions); + void processError(WMError error); private: bool pop_pending_events(); @@ -253,13 +261,11 @@ class WindowManager WMError doTransition(unsigned sequence_number); WMError checkPolicy(unsigned req_num); WMError startTransition(unsigned req_num); - WMError setInvisibleTask(const std::string &role, bool split); WMError doEndDraw(unsigned req_num); WMError layoutChange(const WMAction &action); WMError visibilityChange(const WMAction &action); WMError setSurfaceSize(unsigned surface, const std::string& area); - WMError changeCurrentState(unsigned req_num); void emitScreenUpdated(unsigned req_num); void setTimer(); @@ -267,17 +273,16 @@ class WindowManager void processNextRequest(); int loadOldRoleDb(); - const char* convertRoleOldToNew(char const *drawing_name); - - const char *check_surface_exist(const char *drawing_name); - bool can_split(struct LayoutState const &state, int new_id); + const char *check_surface_exist(const char *role); private: std::unordered_map area2size; std::unordered_map roleold2new; std::unordered_map rolenew2old; + PMWrapper pmw; + static const char* kDefaultOldRoleDb; };