From c251883d9715be08ac8d5f65b048370e72337cc1 Mon Sep 17 00:00:00 2001 From: xianjimli Date: Wed, 1 May 2019 21:29:07 +0800 Subject: [PATCH] update docs --- src/base/bitmap.h | 2 +- src/base/vgcanvas.h | 10 +++++----- src/tkc/event.h | 4 ++-- src/tkc/object_default.c | 5 +++++ src/tkc/object_default.h | 2 +- staticcheck/common/awtk_files.py | 3 ++- tools/idl_gen/idl.json | 16 ++++++++-------- 7 files changed, 24 insertions(+), 18 deletions(-) diff --git a/src/base/bitmap.h b/src/base/bitmap.h index 1a144f29c..fc93534c9 100644 --- a/src/base/bitmap.h +++ b/src/base/bitmap.h @@ -157,7 +157,7 @@ struct _bitmap_t { */ uint16_t format; /** - * @property {char*} name + * @property {const char*} name * @annotation ["readable", "scriptable"] * 名称。 */ diff --git a/src/base/vgcanvas.h b/src/base/vgcanvas.h index 3be851a4c..1713dfc4f 100644 --- a/src/base/vgcanvas.h +++ b/src/base/vgcanvas.h @@ -280,21 +280,21 @@ struct _vgcanvas_t { */ float_t miter_limit; /** - * @property {char*} line_cap + * @property {const char*} line_cap * @annotation ["readable", "scriptable"] * line\_cap。 * @see http://www.w3school.com.cn/tags/canvas_linecap.asp */ const char* line_cap; /** - * @property {char*} line_join + * @property {const char*} line_join * @annotation ["readable", "scriptable"] * line\_join。 * @see http://www.w3school.com.cn/tags/canvas_linejoin.asp */ const char* line_join; /** - * @property {char*} font + * @property {const char*} font * @annotation ["readable", "scriptable"] * 字体。 */ @@ -306,7 +306,7 @@ struct _vgcanvas_t { */ float_t font_size; /** - * @property {char*} text_align + * @property {const char*} text_align * @annotation ["readable", "scriptable"] * 文本对齐方式。 * @@ -314,7 +314,7 @@ struct _vgcanvas_t { */ char* text_align; /** - * @property {char*} text_baseline + * @property {const char*} text_baseline * @annotation ["readable", "scriptable"] * 文本基线。 * diff --git a/src/tkc/event.h b/src/tkc/event.h index 222f7887a..8fd358ac9 100644 --- a/src/tkc/event.h +++ b/src/tkc/event.h @@ -156,13 +156,13 @@ event_t event_init(uint32_t type, void* target); typedef struct _prop_change_event_t { event_t e; /** - * @property {char*} name + * @property {const char*} name * @annotation ["readable", "scriptable"] * 属性的名称。 */ const char* name; /** - * @property {value_t*} value + * @property {const value_t*} value * @annotation ["readable", "scriptable"] * 属性的值。 */ diff --git a/src/tkc/object_default.c b/src/tkc/object_default.c index 0c67adac4..665c67553 100644 --- a/src/tkc/object_default.c +++ b/src/tkc/object_default.c @@ -300,3 +300,8 @@ object_t* object_default_clone(object_default_t* o) { return dup; } + +ret_t object_default_unref(object_t* obj) { + return object_unref(obj); +} + diff --git a/src/tkc/object_default.h b/src/tkc/object_default.h index 1dc1a1ce6..a2d238d9e 100644 --- a/src/tkc/object_default.h +++ b/src/tkc/object_default.h @@ -102,7 +102,7 @@ object_t* object_default_clone(object_default_t* o); * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 * */ -#define object_default_unref object_unref +ret_t object_default_unref(object_t* obj); #define OBJECT_DEFAULT(obj) ((object_default_t*)(obj)) diff --git a/staticcheck/common/awtk_files.py b/staticcheck/common/awtk_files.py index 564584332..b0d67bfdd 100644 --- a/staticcheck/common/awtk_files.py +++ b/staticcheck/common/awtk_files.py @@ -28,13 +28,14 @@ AWKT_WINDOW_ANIMATORS_FILES=glob.glob(AWTK_SRC_DIR+'/window_animators/*.c') AWKT_DIALOG_HIGHLIGHTERS_FILES=glob.glob(AWTK_SRC_DIR+'/dialog_highlighters/*.c') AWKT_FONT_LOADER_FILES=glob.glob(AWTK_SRC_DIR+'/font_loader/*.c') AWKT_IMAGE_LOADER_FILES=glob.glob(AWTK_SRC_DIR+'/image_loader/*.c') +AWKT_DESIGNER_SUPPORT_FILES=glob.glob(AWTK_SRC_DIR+'/designer_support/*.c') AWKT_INPUT_METHOD_FILES=glob.glob(AWTK_SRC_DIR+'/input_methods/input_method_creator.c') AWKT_FONT_GLOBAL_FILES=glob.glob(AWTK_SRC_DIR+'/*.c') COMMON_FILES=AWKT_TKC_FILES + AWKT_BASE_FILES + AWKT_WIDGETS_FILES + AWKT_EXT_WIDGETS_FILES + AWKT_UILOADER_FILES + AWKT_LAYOUTERS_FILES + AWKT_SVG_FILES + AWKT_WIDGET_ANIMATORS_FILES + AWKT_WINDOW_ANIMATORS_FILES + AWKT_DIALOG_HIGHLIGHTERS_FILES + AWKT_CLIPBOARD_FILES + AWKT_FONT_GLOBAL_FILES + AWKT_INPUT_METHOD_FILES; INFER_FILES=COMMON_FILES -WEB_FILES=COMMON_FILES + AWKT_XML_FILES +WEB_FILES=COMMON_FILES + AWKT_XML_FILES + AWKT_DESIGNER_SUPPORT_FILES CPPCHECK_FILES=COMMON_FILES + AWKT_XML_FILES + AWKT_FONT_LOADER_FILES + AWKT_IMAGE_LOADER_FILES def getCppCheckFiles(): diff --git a/tools/idl_gen/idl.json b/tools/idl_gen/idl.json index 9d211d00a..293d51868 100644 --- a/tools/idl_gen/idl.json +++ b/tools/idl_gen/idl.json @@ -923,7 +923,7 @@ { "name": "name", "desc": " 名称。\n\n", - "type": "char*", + "type": "const char*", "annotation": { "readable": true, "scriptable": true @@ -9001,7 +9001,7 @@ { "name": "line_cap", "desc": " line\\_cap。\n @see http://www.w3school.com.cn/tags/canvas_linecap.asp\n\n", - "type": "char*", + "type": "const char*", "annotation": { "readable": true, "scriptable": true @@ -9010,7 +9010,7 @@ { "name": "line_join", "desc": " line\\_join。\n @see http://www.w3school.com.cn/tags/canvas_linejoin.asp\n\n", - "type": "char*", + "type": "const char*", "annotation": { "readable": true, "scriptable": true @@ -9019,7 +9019,7 @@ { "name": "font", "desc": " 字体。\n\n", - "type": "char*", + "type": "const char*", "annotation": { "readable": true, "scriptable": true @@ -9037,7 +9037,7 @@ { "name": "text_align", "desc": " 文本对齐方式。\n\n @see http://www.w3school.com.cn/tags/canvas_textalign.asp\n\n", - "type": "char*", + "type": "const char*", "annotation": { "readable": true, "scriptable": true @@ -9046,7 +9046,7 @@ { "name": "text_baseline", "desc": " 文本基线。\n\n @see http://www.w3school.com.cn/tags/canvas_textbaseline.asp\n\n", - "type": "char*", + "type": "const char*", "annotation": { "readable": true, "scriptable": true @@ -24768,7 +24768,7 @@ { "name": "name", "desc": " 属性的名称。\n\n", - "type": "char*", + "type": "const char*", "annotation": { "readable": true, "scriptable": true @@ -24777,7 +24777,7 @@ { "name": "value", "desc": " 属性的值。\n\n", - "type": "value_t*", + "type": "const value_t*", "annotation": { "readable": true, "scriptable": true