update api doc

This commit is contained in:
lixianjing 2020-10-11 01:19:38 -07:00
parent 682c9b1802
commit d3a4dbfbcc
3 changed files with 127 additions and 4 deletions

View File

@ -384,6 +384,7 @@ EXPORTS
lcd_draw_points
lcd_get_point_color
lcd_fill_rect
lcd_clear_rect
lcd_stroke_rect
lcd_draw_glyph
lcd_measure_text
@ -1274,6 +1275,7 @@ EXPORTS
canvas_draw_hline
canvas_draw_points
canvas_fill_rect
canvas_clear_rect
canvas_stroke_rect
canvas_set_font
canvas_set_text_align
@ -1485,6 +1487,7 @@ EXPORTS
pages_set_active_by_name
label_create
label_set_length
label_set_line_wrap
label_resize_to_content
label_cast
group_box_create

View File

@ -1548,6 +1548,7 @@ const char* widget_get_prop_str(widget_t* widget, const char* name, const char*
/**
* @method widget_set_prop_pointer
*
* @annotation ["scriptable"]
* @param {widget_t*} widget
* @param {const char*} name
* @param {void**} v
@ -1559,6 +1560,7 @@ ret_t widget_set_prop_pointer(widget_t* widget, const char* name, void* v);
/**
* @method widget_get_prop_pointer
*
* @annotation ["scriptable"]
* @param {widget_t*} widget
* @param {const char*} name
*

View File

@ -10543,7 +10543,43 @@
}
],
"annotation": {},
"desc": "绘制矩形。",
"desc": "填充实心矩形。",
"name": "lcd_clear_rect",
"return": {
"type": "ret_t",
"desc": "返回RET_OK表示成功否则表示失败。"
}
},
{
"params": [
{
"type": "lcd_t*",
"name": "lcd",
"desc": "lcd对象。"
},
{
"type": "xy_t",
"name": "x",
"desc": "x坐标。"
},
{
"type": "xy_t",
"name": "y",
"desc": "y坐标。"
},
{
"type": "wh_t",
"name": "w",
"desc": "宽度。"
},
{
"type": "wh_t",
"name": "h",
"desc": "高度。"
}
],
"annotation": {},
"desc": "绘制矩形边框。",
"name": "lcd_stroke_rect",
"return": {
"type": "ret_t",
@ -17770,6 +17806,10 @@
"desc": "长度。",
"name": "WIDGET_PROP_LENGTH"
},
{
"desc": "自动换行。",
"name": "WIDGET_PROP_LINE_WRAP"
},
{
"desc": "文本。",
"name": "WIDGET_PROP_TEXT"
@ -20791,7 +20831,9 @@
"desc": "属性的值。"
}
],
"annotation": {},
"annotation": {
"scriptable": true
},
"desc": "设置指针格式的属性。",
"name": "widget_set_prop_pointer",
"return": {
@ -20812,7 +20854,9 @@
"desc": "属性的名称。"
}
],
"annotation": {},
"annotation": {
"scriptable": true
},
"desc": "获取指针格式的属性。",
"name": "widget_get_prop_pointer",
"return": {
@ -35447,13 +35491,51 @@
"annotation": {
"scriptable": true
},
"desc": "填充矩形。",
"desc": "绘制矩形。",
"name": "canvas_fill_rect",
"return": {
"type": "ret_t",
"desc": "返回RET_OK表示成功否则表示失败。"
}
},
{
"params": [
{
"type": "canvas_t*",
"name": "c",
"desc": "canvas对象。"
},
{
"type": "xy_t",
"name": "x",
"desc": "x坐标。"
},
{
"type": "xy_t",
"name": "y",
"desc": "y坐标。"
},
{
"type": "wh_t",
"name": "w",
"desc": "宽度。"
},
{
"type": "wh_t",
"name": "h",
"desc": "高度。"
}
],
"annotation": {
"scriptable": true
},
"desc": "填充矩形。",
"name": "canvas_clear_rect",
"return": {
"type": "ret_t",
"desc": "返回RET_OK表示成功否则表示失败。"
}
},
{
"params": [
{
@ -42020,6 +42102,29 @@
"desc": "返回RET_OK表示成功否则表示失败。"
}
},
{
"params": [
{
"type": "widget_t*",
"name": "widget",
"desc": "控件对象。"
},
{
"type": "bool_t",
"name": "line_wrap",
"desc": "是否自动换行。"
}
],
"annotation": {
"scriptable": true
},
"desc": "设置是否自动换行。",
"name": "label_set_line_wrap",
"return": {
"type": "ret_t",
"desc": "返回RET_OK表示成功否则表示失败。"
}
},
{
"params": [
{
@ -42092,6 +42197,19 @@
"design": true,
"scriptable": true
}
},
{
"name": "line_wrap",
"desc": "是否自动换行。",
"type": "bool_t",
"annotation": {
"set_prop": true,
"get_prop": true,
"readable": true,
"persitent": true,
"design": true,
"scriptable": true
}
}
],
"header": "widgets/label.h",