From 6a4504b1fe5e17a09a019edf0377646cc5dd72aa Mon Sep 17 00:00:00 2001 From: Marcus Fritzsch Date: Thu, 17 Aug 2017 16:45:56 +0200 Subject: Implement surface names * request_surface(name: string) -> id: int. * activate_surface(name: string). * names will be mapped to their respective layers by use of the layers' surface rola match, a regex. * the generated IDs are global and not reused. * allow wp-request to use -p, disable use of pygments even if found. Things missing: * surface removal does not remove already established mappings/names. * Mostly untested. Signed-off-by: Marcus Fritzsch --- generate-binding-glue.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'generate-binding-glue.py') diff --git a/generate-binding-glue.py b/generate-binding-glue.py index 43bc742..c6fda53 100644 --- a/generate-binding-glue.py +++ b/generate-binding-glue.py @@ -100,14 +100,23 @@ API = { 'api': 'g_afb_instance->app.api.', # where are our API functions 'functions': [ { - 'name': 'register_surface', + 'name': 'request_surface', #'return_type': 'int', # Or do they return all just some json? 'args': [ # describes the functions arguments, and their names as found in the json request - { 'name': 'appid', 'type': 'uint32_t', 'jtype': 'int' }, # XXX: lookup jtypes automatically? i.e. char*|const char* would be string? - { 'name': 'surfaceid', 'type': 'uint32_t', 'jtype': 'int' }, + { 'name': 'drawing_name', 'type': 'char const*', 'jtype': 'string' }, ], }, - { 'name': 'demo_activate_surface', 'args': [ { 'name': 'surfaceid', 'type': 'uint32_t', 'jtype': 'int' } ] }, + { + 'name': 'activate_surface', + 'args': [ + { 'name': 'drawing_name', 'type': 'char const*', 'jtype': 'string' }, + ], + }, + { 'name': 'list_drawing_names', }, + { + 'name': 'demo_activate_surface', + 'args': [ { 'name': 'surfaceid', 'type': 'uint32_t', 'jtype': 'int' } ] + }, { 'name': 'demo_activate_all' }, { 'name': 'debug_status', }, { 'name': 'debug_layers', }, -- cgit 1.2.3-korg