X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fwm_client.hpp;h=fc171f492f6c21e3d6902b2d4a5aeb7afdb64a0d;hb=f7536d2b6ff552e7c4849b36d9b6e140c5b1b9aa;hp=99ae49955cbb8955cff03aed73093eb0f4a4ea52;hpb=fb861c2f05e5f49f4009d0d7c91101259f904f1d;p=apps%2Fagl-service-windowmanager.git diff --git a/src/wm_client.hpp b/src/wm_client.hpp index 99ae499..fc171f4 100644 --- a/src/wm_client.hpp +++ b/src/wm_client.hpp @@ -20,17 +20,22 @@ #include #include #include -#include "util.hpp" #include "wm_error.hpp" extern "C" { +#define AFB_BINDING_VERSION 2 #include } namespace wm { +enum WM_CLIENT_ERROR_EVENT +{ + UNKNOWN_ERROR +}; + class WMClient { public: @@ -47,37 +52,41 @@ class WMClient std::string role() const; unsigned layerID() const; unsigned surfaceID() const; - void registerSurface(unsigned surface); + // void setRole(const std::string& role); + // void appendRole(const std::string& role); WMError addSurface(unsigned surface); - bool isSourceSizeSet(); - void setSurfaceSizeCorrectly(); bool removeSurfaceIfExist(unsigned surface); + // bool removeRole(const std::string& role); + std::vector renderOrder() const; + WMError setRenderOrder(const std::vector& order); + std::string attachTmpServiceSurface(const std::string& from, const std::string& service_surface); + WMError attachServiceSurface(const std::string& service_surface, unsigned surface); - bool subscribe(afb_req_t req, const std::string &event_name); - void emitActive(bool active); - void emitVisible(bool visible); - void emitSyncDraw(const std::string& area, struct rect& r); - void emitFlushDraw(); - void emitError(WMError error); +#if GTEST_ENABLED + bool subscribe(afb_req req, const std::string &event_name); + void emitError(WM_CLIENT_ERROR_EVENT ev); +#endif void dumpInfo(); private: std::string id; unsigned layer; - bool is_source_set; std::string main_role; std::string area; unsigned surface; // currently, main application has only one surface. //std::vector role_list; + std::vector surface_render_order; + std::unordered_map service2surfaces; std::unordered_map role2surface; + std::unordered_map service2supplier; #if GTEST_ENABLED // This is for unit test. afb_make_event occurs sig11 if call not in afb-binding std::unordered_map evname2afb_event; #else - std::unordered_map evname2afb_event; + std::unordered_map evname2afb_event; #endif }; } // namespace wm -#endif +#endif \ No newline at end of file