X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fapplist.hpp;h=b4ac9e0b4367ee00588a7a52eae3cd19e088d065;hb=refs%2Fheads%2Fsandbox%2Fknimitz%2Fset_role_pid_ver;hp=0f2285b5ba6fd6aad7e003b4935000f26ac5719c;hpb=5d5a780a405fdb71a85898d8d988f6ee1bf3b3e0;p=apps%2Fagl-service-windowmanager.git diff --git a/src/applist.hpp b/src/applist.hpp index 0f2285b..b4ac9e0 100644 --- a/src/applist.hpp +++ b/src/applist.hpp @@ -20,9 +20,9 @@ #include #include #include -#include "wm-client.hpp" +#include "wm_client.hpp" #include "request.hpp" -#include "wm-error.h" +#include "wm_error.hpp" namespace wm { @@ -30,12 +30,18 @@ namespace wm /* using std::experimental::nullopt; using std::experimental::optional; */ +struct FloatingSurface +{ + unsigned surface_id; + unsigned pid; +}; + class AppList { public: AppList(); - virtual ~AppList(); - AppList(const AppList &obj) = delete; + virtual ~AppList() = default; + AppList(const AppList &obj); // Client Database Interface void addClient(const std::string &appid, const std::string &role); @@ -45,6 +51,14 @@ class AppList int countClient() const; std::shared_ptr lookUpClient(const std::string &appid); void removeSurface(unsigned surface); + WMError appendRole(const std::string &appid, const std::string &role, unsigned surface); + + // Floating surface & client control + void addFloatingClient(const std::string &appid, unsigned layer, const std::string &role); + void addFloatingSurface(unsigned surface, unsigned pid); + WMError popFloatingSurface(unsigned pid, unsigned *surface); + WMError popFloatingSurface(const std::string &appid, unsigned *surface); + void removeFloatingSurface(unsigned surface); // Request Interface unsigned currentRequestNumber() const; @@ -61,16 +75,20 @@ class AppList void next(); bool haveRequest() const; - struct WMTrigger getRequest(unsigned req_num); - const std::vector &getActions(unsigned req_num); + struct WMTrigger getRequest(unsigned req_num, bool* found); + const std::vector &getActions(unsigned req_num, bool* found); void clientDump(); void reqDump(); + void dumpFloatingSurfaces(); private: std::vector req_list; std::unordered_map> app2client; unsigned current_req; + + std::vector floating_surfaces; + //std::vector floating_clients; }; } // namespace wm