unsigned layer;
};
-
class WindowManager
{
public:
result<int> api_request_surface(char const *appid, char const *role);
char const *api_request_surface(char const *appid, char const *role, char const *ivi_id);
- 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);
- int api_subscribe(afb_req req, int event_id);
+ void api_activate_window(char const *appid, char const *role, char const *drawing_area, const reply_func &reply);
+ void api_deactivate_window(char const *appid, char const *role, const reply_func &reply);
+ void api_enddraw(char const *appid, char const *role);
+ json_object* api_get_area_list();
+ void api_change_area_size(ChangeAreaReq &areas);
+ bool api_subscribe(afb_req_t req, EventType event_id);
result<json_object *> api_get_display_info();
result<json_object *> api_get_area_info(char const *role);
- void api_ping();
- void send_event(const std::string& evname, const std::string& role);
- void send_event(const std::string& evname, const std::string& role, const std::string& area, int x, int y, int w, int h);
// Events from the compositor we are interested in
void surface_created(unsigned surface_id);
void removeClient(const std::string &appid);
void exceptionProcessForTransition();
- const char* convertRoleOldToNew(char const *role);
// Do not use this function
void timerHandler();
void processError(WMError error);
private:
- // WM Events to clients
- void emit_activated(const std::string& role);
- void emit_deactivated(const std::string& role);
- void emit_syncdraw(const std::string& role, char const *area, int x, int y, int w, int h);
- void emit_syncdraw(const std::string &role, const std::string &area);
- void emit_flushdraw(const std::string& role);
- void emit_visible(const std::string& role, bool is_visible);
- void emit_invisible(const std::string& role);
- void emit_visible(const std::string& role);
-
+ unsigned generateLayerForClient(const std::string &role);
WMError setRequest(const std::string &appid, const std::string &role, const std::string &area,
Task task, unsigned *req_num);
WMError checkPolicy(unsigned req_num);
void stopTimer();
void processNextRequest();
- int loadOldRoleDb();
-
- const char *check_surface_exist(const char *role);
-
private:
- std::map<std::string, struct afb_event> map_afb_event;
+ std::map<std::string, afb_event_t> map_afb_event;
std::unordered_map<std::string, struct rect> area2size;
- std::unordered_map<std::string, std::string> roleold2new;
- std::unordered_map<std::string, std::string> rolenew2old;
std::shared_ptr<LayerControl> lc;
PMWrapper pmw;
rect_map area_info;
// ID allocation and proxy methods for lookup
std::unordered_map<unsigned, struct TmpClient> tmp_surface2app;
- static const char* kDefaultOldRoleDb;
};
} // namespace wm