X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fwindow_manager.hpp;h=aa1b4cc6b3048e9a1c0f52cd251b3c84236264e5;hb=741a9924776e40293b91eff00ec91d5a72f5da7f;hp=2358c5af3eb7c9b9409458df8977a80bc024cdd8;hpb=a79b572a5f26d6ecdd97dff159c40bad330e1c4c;p=apps%2Fagl-service-windowmanager.git diff --git a/src/window_manager.hpp b/src/window_manager.hpp index 2358c5a..aa1b4cc 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,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" @@ -211,6 +212,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); @@ -223,12 +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(); @@ -255,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(); @@ -272,16 +276,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; + PMWrapper pmw; + static const char* kDefaultOldRoleDb; }; } // namespace wm -#endif // TMCAGLWM_APP_HPP +#endif // WINDOW_MANAGER_HPP