summaryrefslogtreecommitdiffstats
path: root/src/libwindowmanager.h
diff options
context:
space:
mode:
authorKazumasa Mitsunari <knimitz@witz-inc.co.jp>2018-12-26 11:35:44 +0900
committerKazumasa Mitsunari <knimitz@witz-inc.co.jp>2018-12-26 11:35:44 +0900
commit4234ce5ef2a154f9490ade28a461915af5c642f2 (patch)
tree17041a9c6a14207edcdd890df9644040977d78c0 /src/libwindowmanager.h
parentf427515b412094b7feb09838793ce2e48118839d (diff)
Introduce changeAreaSize and getAreaList
In CES2019 demo, these features are introduced in demo3. 1. changeAreaSize : change area definition on runtime 2. getAreaList : get area definition list Bug-AGL : SPEC-2077 Change-Id: I0eade8b25be6b676d270699057e560ce78fbe63e Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
Diffstat (limited to 'src/libwindowmanager.h')
-rw-r--r--src/libwindowmanager.h23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/libwindowmanager.h b/src/libwindowmanager.h
index cc65136..c9da4ca 100644
--- a/src/libwindowmanager.h
+++ b/src/libwindowmanager.h
@@ -20,6 +20,7 @@
#include <functional>
#include <vector>
#include <string>
+#include <unordered_map>
#include <json-c/json.h>
class Rect {
@@ -43,8 +44,7 @@ class Rect {
unsigned _h;
};
-struct Screen
-{
+struct Screen {
unsigned long width_dp;
unsigned long height_dp;
unsigned long width_mm;
@@ -70,6 +70,23 @@ class WMHandler {
screen_updated_handler on_screen_updated;
};
+class ChangeAreaReq {
+ public:
+ ChangeAreaReq() {}
+ ~ChangeAreaReq() = default;
+ void setAreaReq(const std::unordered_map<std::string, Rect> &area_req) { this->_area_req = area_req; }
+ void addAreaReq(const std::string& area_name, const Rect& area_size) { this->_area_req[area_name] = area_size; }
+ void setSaveReq(bool save) { this->_save = save; }
+ bool getSave() const { return this->_save; }
+ void addAreaList(const std::string& area_name, const Rect& area_size){ this->_area_list[area_name] = area_size; }
+ const std::unordered_map<std::string, Rect>& getReq() const { return this->_area_req; }
+ const std::unordered_map<std::string, Rect>& getList() const { return this->_area_list; }
+ private:
+ std::unordered_map<std::string, Rect> _area_req;
+ std::unordered_map<std::string, Rect> _area_list;
+ bool _save = false;
+};
+
class LibWindowmanager {
public:
LibWindowmanager();
@@ -122,6 +139,8 @@ public:
int deactivateWindow(const char* role);
int endDraw(const char* role);
struct Screen getScreenInfo();
+ int getAreaList(ChangeAreaReq* req);
+ int changeAreaSize(const ChangeAreaReq& req);
int getAreaInfo(const char* role, Rect *out_rect);
void setEventHandler(const WMHandler& wmh);