#include <memory>
#include <unordered_map>
#include <experimental/optional>
-#include "controller_hooks.hpp"
-//#include "layers.hpp"
-// #include "layout.hpp"
-//#include "wayland_ivi_wm.hpp"
#include "result.hpp"
#include "pm_wrapper.hpp"
#include "util.hpp"
struct json_object;
-namespace wl
-{
-struct display;
-}
-
-namespace compositor
-{
-struct controller;
-}
-
namespace wm
{
void api_enddraw(char const *appid, char const *role);
result<json_object *> api_get_display_info();
result<json_object *> api_get_area_info(char const *role);
- void api_ping();
void send_event(char const *evname, char const *label);
void send_event(char const *evname, char const *label, char const *area, int x, int y, int w, int h);
// 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();
std::map<const char *, struct afb_event> map_afb_event;
private:
- int init_layers();
- void surface_set_layout(int surface_id, const std::string& area = "");
- void layout_commit();
-
// WM Events to clients
void emit_activated(char const *label);
void emit_deactivated(char const *label);
WMError startTransition(unsigned req_num);
WMError doEndDraw(unsigned req_num);
- WMError layoutChange(const WMAction &action);
- WMError visibilityChange(const WMAction &action);
- WMError setSurfaceSize(unsigned surface, const std::string& area);
void emitScreenUpdated(unsigned req_num);
void setTimer();
const char *check_surface_exist(const char *role);
private:
- 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;
- struct controller_hooks chooks;
// ID allocation and proxy methods for lookup
struct id_allocator id_alloc;
// Surface are info (x, y, w, h)
rect_map area_info;
// FOR CES DEMO
- std::vector<int> surface_bg;
std::unordered_map<unsigned, std::string> tmp_surface2app;
static const char* kDefaultOldRoleDb;