From af366f2fd46e87825a8d1470c79195f3d1fe5a93 Mon Sep 17 00:00:00 2001 From: Li XianJing Date: Thu, 6 Sep 2018 17:29:54 +0800 Subject: [PATCH] format code and update docs --- docs/script_binding.md | 4 ++-- src/base/keys.h | 26 +++++++++++++++++++++++++- src/base/main_loop.c | 5 ++--- src/lcd/lcd_mem.inc | 2 +- 4 files changed, 30 insertions(+), 7 deletions(-) mode change 100755 => 100644 src/lcd/lcd_mem.inc diff --git a/docs/script_binding.md b/docs/script_binding.md index 24273b030..f051e190f 100644 --- a/docs/script_binding.md +++ b/docs/script_binding.md @@ -23,6 +23,6 @@ 1.[API注释格式](api_doc.md) -2.[JS绑定](https://github.com/zlgopen/awtk-lua) +2.[JS绑定](https://github.com/zlgopen/awtk-js) -3.[Lua绑定](https://github.com/zlgopen/awtk-js) +3.[Lua绑定](https://github.com/zlgopen/awtk-lua) diff --git a/src/base/keys.h b/src/base/keys.h index 9394db90d..4bde403f1 100644 --- a/src/base/keys.h +++ b/src/base/keys.h @@ -65,7 +65,7 @@ typedef enum _key_code_t { FKEY_COLON = ':', FKEY_SEMICOLON = ';', FKEY_LESS = '<', - FKEY_EQUALS = '=', + FKEY_EQUAL = '=', FKEY_GREATER = '>', FKEY_QUESTION = '?', FKEY_AT = '@', @@ -131,6 +131,8 @@ typedef enum _key_code_t { FKEY_Y = 'Y', FKEY_Z = 'Z', FKEY_DELETE = '\177', + FKEY_LEFTBRACE = '(', + FKEY_RIGHTBRACE = ')', #ifdef SDL2 FKEY_CAPSLOCK = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CAPSLOCK), @@ -311,6 +313,8 @@ typedef enum _key_code_t { FKEY_APP2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_APP2), #else + /*FIXME*/ + FKEY_DOT = '.', FKEY_LSHIFT = 0, FKEY_RSHIFT = 0, FKEY_LCTRL = 0, @@ -318,6 +322,26 @@ typedef enum _key_code_t { FKEY_LALT = 0, FKEY_RALT = 0, FKEY_CAPSLOCK = 0, + FKEY_HOME = 0, + FKEY_UP = 0, + FKEY_DOWN = 0, + FKEY_LEFT = 0, + FKEY_RIGHT = 0, + FKEY_PAGEUP = 0, + FKEY_PAGEDOWN = 0, + FKEY_F1 = 0, + FKEY_F2 = 0, + FKEY_F3 = 0, + FKEY_F4 = 0, + FKEY_F5 = 0, + FKEY_F6 = 0, + FKEY_F7 = 0, + FKEY_F8 = 0, + FKEY_F9 = 0, + FKEY_F10 = 0, + FKEY_ENTER = 0, + FKEY_END = 0, + FKEY_INSERT = 0, #endif } key_code_t; diff --git a/src/base/main_loop.c b/src/base/main_loop.c index 78f906f23..494b6d7d1 100644 --- a/src/base/main_loop.c +++ b/src/base/main_loop.c @@ -115,10 +115,9 @@ ret_t main_loop_sleep_default(main_loop_t* l) { } ret_t main_loop_sleep(main_loop_t* l) { - if(l->sleep != NULL) { + if (l->sleep != NULL) { return l->sleep(l); - } + } return main_loop_sleep_default(l); } - diff --git a/src/lcd/lcd_mem.inc b/src/lcd/lcd_mem.inc old mode 100755 new mode 100644 index 1536ded0d..69cb18a42 --- a/src/lcd/lcd_mem.inc +++ b/src/lcd/lcd_mem.inc @@ -280,7 +280,7 @@ static ret_t lcd_mem_draw_image_matrix(lcd_t* lcd, draw_image_info_t* info) { #else (void)lcd; (void)info; - + return RET_NOT_IMPL; #endif /*WITH_PIXMAN*/ }