diff options
author | Yuta Doi <yuta-d@witz-inc.co.jp> | 2017-12-11 11:38:01 +0900 |
---|---|---|
committer | Yuta Doi <yuta-d@witz-inc.co.jp> | 2017-12-11 11:38:01 +0900 |
commit | 6aaba1066fe89f324d4bae67497f4035fe997d5f (patch) | |
tree | 89ecc85436fcc1e5567d6dfa8f10dadee0121c61 /generate-binding-glue.py | |
parent | 7fb167a27e9e12ef38c5942cf73679bff12a5b25 (diff) |
Add APIs which can get information of display and area
getDisplayInfo() can get the display information as follows:
- width[pixel]
- height[pixel]
- width[mm]
- height[mm]
NOTE:
It uses wl_output::geometry() for getting physical width[mm] and height[mm] of the display,
but the value is different with measured value.
value from wl_output::geometry(): width:320 height:520
measured value : width:193 height:343
getAreaInfo() can get the information of area drawn by the application as follows:
- x-coordinate
- y-coordinate
- width
- height
The details are described in doc/ApplicationGuide.md.
Change-Id: I41eec6251527862ef25d1b84cd37d736d3f9c8aa
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
Diffstat (limited to 'generate-binding-glue.py')
-rw-r--r-- | generate-binding-glue.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/generate-binding-glue.py b/generate-binding-glue.py index 376350a..790ef40 100644 --- a/generate-binding-glue.py +++ b/generate-binding-glue.py @@ -112,7 +112,7 @@ def emit_afb_api(api): p(' typedef wm::result<json_object *> result_type;') p(' struct wm::App *app;') p(' void send_event(char const *evname, char const *label);') - p(' void send_event(char const *evname, char const *label, char const *area);') + p(' void send_event(char const *evname, char const *label, char const *area, int x, int y, int w, int h);') for f in api['functions']: p(' result_type %(name)s(' % f + ', '.join(map(lambda x: '%(type)s %(name)s' % x, f.get('args', []))) + ');') p('};', '') @@ -151,6 +151,14 @@ API = { { 'name': 'drawing_name', 'type': 'char const*', 'jtype': 'string' }, ], }, + + { 'name': 'getdisplayinfo', }, + { + 'name': 'getareainfo', + 'args': [ + { 'name': 'drawing_name', 'type': 'char const*', 'jtype': 'string' }, + ], + }, { 'name': 'wm_subscribe', }, { 'name': 'list_drawing_names', }, |