X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fapplist.hpp;h=fef4d65f9abd3b191c29f9d2187f470a689972d6;hb=741a9924776e40293b91eff00ec91d5a72f5da7f;hp=a794b532c8072cab37f1aedcafd93fa6b9987b5d;hpb=9d8002a41299d8755ed548f96be89eefe660c1bd;p=apps%2Fagl-service-windowmanager.git diff --git a/src/applist.hpp b/src/applist.hpp index a794b53..fef4d65 100644 --- a/src/applist.hpp +++ b/src/applist.hpp @@ -31,6 +31,13 @@ namespace wm /* using std::experimental::nullopt; using std::experimental::optional; */ +struct FloatingSurface +{ + std::string appid; + unsigned surface_id; + unsigned pid; +}; + class AppList { public: @@ -50,6 +57,14 @@ class AppList std::shared_ptr lookUpClient(const std::string &appid); void removeSurface(unsigned surface); std::string getAppID(unsigned surface, const std::string &role, bool *found) const; + WMError appendRole(const std::string &appid, const std::string &role, unsigned surface); + + // Floating surface + void addFloatingClient(const std::string &appid, unsigned layer, const std::string &role); + void addFloatingSurface(const std::string &appid, 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; @@ -69,12 +84,14 @@ class AppList void clientDump(); void reqDump(); + void dumpFloatingSurfaces(); private: std::vector req_list; std::unordered_map> app2client; unsigned current_req; std::mutex mtx; + std::vector floating_surfaces; }; } // namespace wm