diff options
author | 2017-10-26 15:58:21 +0200 | |
---|---|---|
committer | 2017-10-26 15:58:21 +0200 | |
commit | e1f0a60f5a06ff21b85d7905e77913fb9acacab4 (patch) | |
tree | 501fd8b0d224c261c2591a0c3cddc5aa66aaa385 /src/libwindowmanager.h | |
parent | c986011039cbb77171486d4b916c888f390cfbe2 (diff) |
Add spitted library from agl-service-windowmanager
Relate commit : https://gerrit.automotivelinux.org/gerrit/#/c/11451/
Change-Id: Id82ee513e06f0c12eba044b8d42d8dde68063168
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
# Conflicts:
# src/CMakeLists.txt
# src/libwindowmanager.cpp
Diffstat (limited to 'src/libwindowmanager.h')
-rw-r--r-- | src/libwindowmanager.h | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/src/libwindowmanager.h b/src/libwindowmanager.h index 6c13763..5bc97de 100644 --- a/src/libwindowmanager.h +++ b/src/libwindowmanager.h @@ -18,6 +18,7 @@ #define LIBWINDOWMANAGER_H #include <functional> +#include <json-c/json.h> class LibWindowmanager { public: @@ -27,7 +28,18 @@ public: LibWindowmanager(const LibWindowmanager &) = delete; LibWindowmanager &operator=(const LibWindowmanager &) = delete; - using handler_fun = std::function<void(const char *)>; + using handler_fun = std::function<void(json_object *)>; + + /* DrawingArea name (usage: {layout}.{area}) */ + const std::string kStrLayoutNormal = "normal"; + const std::string kStrLayoutSplit = "split"; + const std::string kStrAreaFull = "full"; + const std::string kStrAreaMain = "main"; + const std::string kStrAreaSub = "sub"; + + /* Key for json obejct */ + constexpr static char *kKeyDrawingName = "drawing_name"; + constexpr static char *kKeyDrawingArea = "drawing_area"; enum EventType { Event_Active = 1, @@ -43,10 +55,10 @@ public: int init(int port, char const *token); // WM API - int requestSurface(const char *label); - int activateSurface(const char *label); - int deactivateSurface(const char *label); - int endDraw(const char *label); + int requestSurface(json_object *object); + int activateSurface(json_object *object); + int deactivateSurface(json_object *object); + int endDraw(json_object *object); void set_event_handler(enum EventType et, handler_fun f); |