mirror of
https://gitee.com/zlgopen/awtk.git
synced 2024-11-30 02:58:26 +08:00
add event_cast/widget_cast/g
This commit is contained in:
parent
beaafbafa5
commit
7e335f8a19
@ -87,3 +87,7 @@ ret_t pointer_event_rotate(pointer_event_t* evt, system_info_t* info) {
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
event_t* event_cast(event_t* event) {
|
||||
return event;
|
||||
}
|
||||
|
@ -303,6 +303,16 @@ typedef struct _event_t {
|
||||
void* target;
|
||||
} event_t;
|
||||
|
||||
/**
|
||||
* @method event_cast
|
||||
* @annotation ["cast", "scriptable"]
|
||||
* 把event对象转wheel_event_t对象,主要给脚本语言使用。
|
||||
* @param {event_t*} event event对象。
|
||||
*
|
||||
* @return {event_t*} 对象。
|
||||
*/
|
||||
event_t* event_cast(event_t* event);
|
||||
|
||||
/**
|
||||
* @class wheel_event_t
|
||||
* @annotation ["scriptable"]
|
||||
|
@ -1475,3 +1475,8 @@ const char* widget_get_type(widget_t* widget) {
|
||||
|
||||
return widget->vt->type;
|
||||
}
|
||||
|
||||
widget_t* widget_cast(widget_t* widget) {
|
||||
return widget;
|
||||
}
|
||||
|
||||
|
@ -855,6 +855,16 @@ ret_t widget_set_children_layout_params(widget_t* widget, const char* params);
|
||||
*/
|
||||
ret_t widget_layout(widget_t* widget);
|
||||
|
||||
/**
|
||||
* @method widget_cast
|
||||
* 转换为widget对象(供脚本语言使用)。
|
||||
* @annotation ["cast", "scriptable"]
|
||||
* @param {widget_t*} widget widget对象。
|
||||
*
|
||||
* @return {widget_t*} widget对象。
|
||||
*/
|
||||
widget_t* widget_cast(widget_t* widget);
|
||||
|
||||
/**
|
||||
* @method widget_destroy
|
||||
* 销毁控件。
|
||||
|
@ -3381,7 +3381,27 @@
|
||||
},
|
||||
{
|
||||
"type": "class",
|
||||
"methods": [],
|
||||
"methods": [
|
||||
{
|
||||
"params": [
|
||||
{
|
||||
"type": "event_t*",
|
||||
"name": "event",
|
||||
"desc": "event对象。"
|
||||
}
|
||||
],
|
||||
"annotation": {
|
||||
"cast": true,
|
||||
"scriptable": true
|
||||
},
|
||||
"desc": "把event对象转wheel_event_t对象,主要给脚本语言使用。",
|
||||
"name": "event_cast",
|
||||
"return": {
|
||||
"type": "event_t*",
|
||||
"desc": "对象。"
|
||||
}
|
||||
}
|
||||
],
|
||||
"properties": [
|
||||
{
|
||||
"name": "type",
|
||||
@ -15142,6 +15162,25 @@
|
||||
"desc": "返回RET_OK表示成功,否则表示失败。"
|
||||
}
|
||||
},
|
||||
{
|
||||
"params": [
|
||||
{
|
||||
"type": "widget_t*",
|
||||
"name": "widget",
|
||||
"desc": "widget对象。"
|
||||
}
|
||||
],
|
||||
"annotation": {
|
||||
"cast": true,
|
||||
"scriptable": true
|
||||
},
|
||||
"desc": "转换为widget对象(供脚本语言使用)。",
|
||||
"name": "widget_cast",
|
||||
"return": {
|
||||
"type": "widget_t*",
|
||||
"desc": "widget对象。"
|
||||
}
|
||||
},
|
||||
{
|
||||
"params": [
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user