diff options
author | Kazumasa Mitsunari <knimitz@witz-inc.co.jp> | 2017-10-23 17:31:27 +0900 |
---|---|---|
committer | Kazumasa Mitsunari <knimitz@witz-inc.co.jp> | 2017-11-01 03:07:41 +0000 |
commit | eb7fc4eb593d723f1ac2ed4e5b523afd34e992ac (patch) | |
tree | a0a812ed805803cddb3c4c47abc711134f208130 /src/app.hpp | |
parent | 6072fd18501ed0d2eb8699bbeae950f9cd005ad2 (diff) |
Add drawing_area parameter to API
Add drawing_area parameter in activateSurface API
and syncDraw event.
This is needed for the following feature
- To request writting area
- To inform application of writting area
I assume that
"normal.full" is a full size area in application area,
and "split.[main|sub]" is an upper/lower half size area
in application area.
For example, when Navigation app receives syncDraw event
which the label is Navigation, and the area name is
"normal.full", it means Navigation will be displayed
as a full size(in application area).
When Navigation app receives syncDraw event which
the label is same, and the area name is "split.main",
it means Navigation will be displayed
as an upper half size(in application area).
Application must return endDraw after changing its design
according to the size,
when the application receives syncDraw event.
Layout is defined in layers.json file.
Current layout is set to full screen.
Bug-AGL: SPEC-987
Change-Id: I5efed3dda88275e18dc1d951b98bdfcfc79ee46b
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
Diffstat (limited to 'src/app.hpp')
-rw-r--r-- | src/app.hpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/app.hpp b/src/app.hpp index 9424d9f..ea3e92b 100644 --- a/src/app.hpp +++ b/src/app.hpp @@ -46,6 +46,17 @@ namespace wm { using std::experimental::optional; +/* DrawingArea name used by "{layout}.{area}" */ +static const char *kNameLayoutNormal = "normal"; +static const char *kNameLayoutSplit = "split"; +static const char *kNameAreaFull = "full"; +static const char *kNameAreaMain = "main"; +static const char *kNameAreaSub = "sub"; + +/* Key for json obejct */ +static const char *kKeyDrawingName = "drawing_name"; +static const char *kKeyDrawingArea = "drawing_area"; + struct id_allocator { unsigned next = 1; @@ -141,7 +152,7 @@ struct App { void set_pending_events(); result<int> api_request_surface(char const *drawing_name); - char const *api_activate_surface(char const *drawing_name); + char const *api_activate_surface(char const *drawing_name, char const *drawing_area); char const *api_deactivate_surface(char const *drawing_name); char const *api_enddraw(char const *drawing_name); void api_ping(); @@ -167,7 +178,7 @@ private: // TMC WM Events to clients void emit_activated(char const *label); void emit_deactivated(char const *label); - void emit_syncdraw(char const *label); + void emit_syncdraw(char const *label, char const *area); void emit_flushdraw(char const *label); void emit_visible(char const *label, bool is_visible); void emit_invisible(char const *label); |