add exported functions

This commit is contained in:
xianjimli 2020-06-10 20:02:31 +08:00
parent 916e9e6491
commit b6ca271fd9
4 changed files with 1457 additions and 1198 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,9 +1,10 @@
# 最新动态
* 2020/06/10
* 增加宏 NATIVE_WINDOW_BORDERLESS 控制是否去掉 native window 的标题栏。
* 增加宏 NATIVE\_WINDOW\_BORDERLESS 控制是否去掉 native window 的标题栏。
* 增加 FAQ《应用程序在 Windows 的手持设备中运行,如何去掉窗口的标题栏》
* image value 支持16进制格式。
* 增加一些导出函数(感谢尧燊提供补丁)
* 2020/06/09
* 增加 dll 导出函数(感谢俊杰提供补丁)。

View File

@ -2000,7 +2000,6 @@ ret_t widget_dispatch_to_key_target(widget_t* widget, event_t* e);
/**
* @method widget_find_target
* x/y坐标对应的子控件
* @annotation ["private"]
* @param {widget_t*} widget
* @param {xy_t} x x坐标
* @param {xy_t} y y坐标
@ -2012,7 +2011,6 @@ widget_t* widget_find_target(widget_t* widget, xy_t x, xy_t y);
/**
* @method widget_re_translate_text
* ()
* @annotation ["private"]
* @param {widget_t*} widget
*
* @return {ret_t} RET_OK表示成功
@ -2321,9 +2319,41 @@ ret_t widget_on_pointer_down(widget_t* widget, pointer_event_t* e);
ret_t widget_on_pointer_move(widget_t* widget, pointer_event_t* e);
ret_t widget_on_pointer_up(widget_t* widget, pointer_event_t* e);
ret_t widget_on_context_menu(widget_t* widget, pointer_event_t* e);
/**
* @method widget_on_paint_background
*
* @param {widget_t*} widget
* @param {canvas_t*} c canvas对象
*
* @return {ret_t}
*/
ret_t widget_on_paint_background(widget_t* widget, canvas_t* c);
/**
* @method widget_on_paint_self
*
* @param {widget_t*} widget
* @param {canvas_t*} c canvas对象
*
* @return {ret_t}
*/
ret_t widget_on_paint_self(widget_t* widget, canvas_t* c);
/**
* @method widget_on_paint_children
*
* @param {widget_t*} widget
* @param {canvas_t*} c canvas对象
*
* @return {ret_t}
*/
ret_t widget_on_paint_children(widget_t* widget, canvas_t* c);
/**
* @method widget_on_paint_border
*
* @param {widget_t*} widget
* @param {canvas_t*} c canvas对象
*
* @return {ret_t}
*/
ret_t widget_on_paint_border(widget_t* widget, canvas_t* c);
ret_t widget_on_paint_begin(widget_t* widget, canvas_t* c);
ret_t widget_on_paint_end(widget_t* widget, canvas_t* c);
@ -2347,7 +2377,21 @@ bool_t widget_is_instance_of(widget_t* widget, const widget_vtable_t* vt);
/*public for subclass*/
TK_EXTERN_VTABLE(widget);
/**
* @method widget_set_need_relayout_children
* relayout标识
* @param {widget_t*} widget
*
* @return {ret_t}
*/
ret_t widget_set_need_relayout_children(widget_t* widget);
/**
* @method widget_ensure_visible_in_viewport
* 使
* @param {widget_t*} widget
*
* @return {ret_t}
*/
ret_t widget_ensure_visible_in_viewport(widget_t* widget);
ret_t widget_set_need_update_style(widget_t* widget);
bool_t widget_is_activate_key(widget_t* widget, key_event_t* e);
@ -2429,7 +2473,21 @@ ret_t widget_begin_wait_pointer_cursor(widget_t* widget, bool_t ignore_user_inpu
ret_t widget_end_wait_pointer_cursor(widget_t* widget);
bool_t widget_has_focused_widget_in_window(widget_t* widget);
/**
* @method widget_set_style
* widget私有样式
* @param {widget_t*} widget
* @param {const char*} state_and_name
* @param {const value_t*} value
*
* @return {ret_t}
*/
ret_t widget_set_style(widget_t* widget, const char* state_and_name, const value_t* value);
/**
* @method widget_calc_icon_text_rect
* icon text的位置
*
*/
ret_t widget_calc_icon_text_rect(const rect_t* ir, int32_t font_size, float_t text_size,
int32_t icon_at, uint32_t img_w, uint32_t img_h, int32_t spacer,
rect_t* r_text, rect_t* r_icon);

View File

@ -20064,6 +20064,48 @@
"desc": "返回RET_OK表示成功否则表示失败。"
}
},
{
"params": [
{
"type": "widget_t*",
"name": "widget",
"desc": "控件对象。"
},
{
"type": "xy_t",
"name": "x",
"desc": "x坐标。"
},
{
"type": "xy_t",
"name": "y",
"desc": "y坐标。"
}
],
"annotation": {},
"desc": "查找x/y坐标对应的子控件。",
"name": "widget_find_target",
"return": {
"type": "widget*",
"desc": "子控件或NULL。"
}
},
{
"params": [
{
"type": "widget_t*",
"name": "widget",
"desc": "控件对象。"
}
],
"annotation": {},
"desc": "语言改变后,重新翻译控件上的文本(包括子控件)。",
"name": "widget_re_translate_text",
"return": {
"type": "ret_t",
"desc": "返回RET_OK表示成功否则表示失败。"
}
},
{
"params": [
{
@ -20490,6 +20532,90 @@
"desc": "返回canvas对象。"
}
},
{
"params": [
{
"type": "widget_t*",
"name": "widget",
"desc": "控件对象。"
},
{
"type": "canvas_t*",
"name": "c",
"desc": "canvas对象。"
}
],
"annotation": {},
"desc": "绘制背景。",
"name": "widget_on_paint_background",
"return": {
"type": "ret_t",
"desc": "返回。"
}
},
{
"params": [
{
"type": "widget_t*",
"name": "widget",
"desc": "控件对象。"
},
{
"type": "canvas_t*",
"name": "c",
"desc": "canvas对象。"
}
],
"annotation": {},
"desc": "绘制自身。",
"name": "widget_on_paint_self",
"return": {
"type": "ret_t",
"desc": "返回。"
}
},
{
"params": [
{
"type": "widget_t*",
"name": "widget",
"desc": "控件对象。"
},
{
"type": "canvas_t*",
"name": "c",
"desc": "canvas对象。"
}
],
"annotation": {},
"desc": "绘制子控件。",
"name": "widget_on_paint_children",
"return": {
"type": "ret_t",
"desc": "返回。"
}
},
{
"params": [
{
"type": "widget_t*",
"name": "widget",
"desc": "控件对象。"
},
{
"type": "canvas_t*",
"name": "c",
"desc": "canvas对象。"
}
],
"annotation": {},
"desc": "绘制边框。",
"name": "widget_on_paint_border",
"return": {
"type": "ret_t",
"desc": "返回。"
}
},
{
"params": [
{
@ -20511,6 +20637,38 @@
"desc": "返回TRUE表示是FALSE表示否。"
}
},
{
"params": [
{
"type": "widget_t*",
"name": "widget",
"desc": "控件对象。"
}
],
"annotation": {},
"desc": "设置控件需要relayout标识。",
"name": "widget_set_need_relayout_children",
"return": {
"type": "ret_t",
"desc": "返回。"
}
},
{
"params": [
{
"type": "widget_t*",
"name": "widget",
"desc": "控件对象。"
}
],
"annotation": {},
"desc": "使控件滚动到可见区域。",
"name": "widget_ensure_visible_in_viewport",
"return": {
"type": "ret_t",
"desc": "返回。"
}
},
{
"params": [
{
@ -20643,6 +20801,38 @@
"type": "ret_t",
"desc": "返回RET_OK表示成功否则表示失败。。"
}
},
{
"params": [
{
"type": "widget_t*",
"name": "widget",
"desc": "控件对象。"
},
{
"type": "const char*",
"name": "state_and_name",
"desc": "样式对应类型与名字。"
},
{
"type": "const value_t*",
"name": "value",
"desc": "值。"
}
],
"annotation": {},
"desc": "设置widget私有样式。",
"name": "widget_set_style",
"return": {
"type": "ret_t",
"desc": "。"
}
},
{
"params": [],
"annotation": {},
"desc": "计算icon text的位置。",
"name": "widget_calc_icon_text_rect"
}
],
"events": [