X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2Fwindow_manager.hpp;h=30881111c59274152c3737507c12cef23f0c7fe7;hb=838d50406889ecd96271153ed9ec3a8160bcfe16;hp=ebdf495f76755bc82dbf544276c5bb8653a6c738;hpb=6bc7a273350721be300423b1509527f336dce50e;p=apps%2Fagl-service-windowmanager.git diff --git a/src/window_manager.hpp b/src/window_manager.hpp index ebdf495..3088111 100644 --- a/src/window_manager.hpp +++ b/src/window_manager.hpp @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef TMCAGLWM_APP_HPP -#define TMCAGLWM_APP_HPP +#ifndef WINDOW_MANAGER_HPP +#define WINDOW_MANAGER_HPP #include #include @@ -25,9 +25,11 @@ #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" +#include "wm_layer_control.hpp" struct json_object; @@ -65,6 +67,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 @@ -210,6 +213,7 @@ class WindowManager 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); @@ -222,12 +226,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(); @@ -254,13 +262,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(); @@ -271,16 +277,16 @@ class WindowManager const char *check_surface_exist(const char *role); - bool can_split(struct LayoutState const &state, int new_id); - private: std::unordered_map area2size; std::unordered_map roleold2new; std::unordered_map rolenew2old; + std::shared_ptr lm; + PMWrapper pmw; static const char* kDefaultOldRoleDb; }; } // namespace wm -#endif // TMCAGLWM_APP_HPP +#endif // WINDOW_MANAGER_HPP