fix api docs

This commit is contained in:
lixianjing 2022-01-05 17:52:43 +08:00
parent e5693a7685
commit e55cffb50b
19 changed files with 101 additions and 82 deletions

View File

@ -4,6 +4,7 @@
* fscript公开函数value\_id/value\_func。
* fscript增加log10/pow10等函数。
* 修复在多次半透叠加后数据不正常的问题(感谢智明提供补丁)
* 修复注释错误(感谢朝泽提供补丁)
2022/01/04
* fscript支持保存函数名方便调试。

View File

@ -271,7 +271,7 @@ asset_info_t* assets_manager_load(assets_manager_t* am, asset_type_t type, const
* WITH\_FS\_RES时才生效
* @param {assets_manager_t*} am asset manager对象
* @param {asset_type_t} type
* @param {asset_type_t} type
* @param {uint16_t} subtype
* @param {char*} name
*
* @return {asset_info_t*}

View File

@ -105,7 +105,7 @@ ret_t clip_board_clear(clip_board_t* cl);
*
* @param {clip_board_t*} cl
* @param {clip_board_data_type_t} type
* @param {const void* data} data
* @param {const void*} data
* @param {uint32_t} size
*
* @return {ret_t} RET_OK表示成功
@ -118,7 +118,7 @@ ret_t clip_board_set_data(clip_board_t* cl, clip_board_data_type_t type, const v
*
* @param {clip_board_t*} cl
* @param {clip_board_data_type_t*} type (NULL)
* @param {void** data} data (NULL)
* @param {void**} data (NULL)
* @param {uint32_t*} size (NULL)
*
* @return {ret_t} RET_OK表示成功

View File

@ -704,7 +704,7 @@ ret_t lcd_destroy(lcd_t* lcd);
ret_t lcd_get_dirty_rect(lcd_t* lcd, rect_t* r);
/**
* @method lcd_get_dirty_rect
* @method lcd_get_dirty_rects
* lcd
* @param {lcd_t*} lcd lcd对象
*

View File

@ -171,7 +171,7 @@ ret_t system_info_deinit(void);
* @method system_info_set_font_scale
*
*
* @param {system_info_t* info} info system_info对象
* @param {system_info_t*} info system_info对象
* @param {float_t} font_scale
*
* @return {ret_t} RET_OK表示成功
@ -182,7 +182,7 @@ ret_t system_info_set_font_scale(system_info_t* info, float_t font_scale);
* @method system_info_set_app_root
* app root
*
* @param {system_info_t* info} info system_info对象
* @param {system_info_t*} info system_info对象
* @param {const char*} app_root app root
*
* @return {ret_t} RET_OK表示成功
@ -193,7 +193,7 @@ ret_t system_info_set_app_root(system_info_t* info, const char* app_root);
* @method system_info_set_default_font
*
*
* @param {system_info_t* info} info system_info对象
* @param {system_info_t*} info system_info对象
* @param {const char*} default_font
*
* @return {ret_t} RET_OK表示成功
@ -204,7 +204,7 @@ ret_t system_info_set_default_font(system_info_t* info, const char* default_font
* @method system_info_set_lcd_w
* LCD宽度
*
* @param {system_info_t* info} info system_info对象
* @param {system_info_t*} info system_info对象
* @param {uint32_t} lcd_w LCD宽度
*
* @return {ret_t} RET_OK表示成功
@ -215,7 +215,7 @@ ret_t system_info_set_lcd_w(system_info_t* info, uint32_t lcd_w);
* @method system_info_set_lcd_h
* LCD高度
*
* @param {system_info_t* info} info system_info对象
* @param {system_info_t*} info system_info对象
* @param {uint32_t} lcd_h LCD高度
*
* @return {ret_t} RET_OK表示成功
@ -226,7 +226,7 @@ ret_t system_info_set_lcd_h(system_info_t* info, uint32_t lcd_h);
* @method system_info_set_lcd_type
* LCD类型
*
* @param {system_info_t* info} info system_info对象
* @param {system_info_t*} info system_info对象
* @param {lcd_type_t} lcd_type LCD类型
*
* @return {ret_t} RET_OK表示成功
@ -237,7 +237,7 @@ ret_t system_info_set_lcd_type(system_info_t* info, lcd_type_t lcd_type);
* @method system_info_set_lcd_orientation
* LCD的旋转角度
*
* @param {system_info_t* info} info system_info对象
* @param {system_info_t*} info system_info对象
* @param {lcd_orientation_t} lcd_orientation LCD的旋转角度
*
* @return {ret_t} RET_OK表示成功
@ -248,7 +248,7 @@ ret_t system_info_set_lcd_orientation(system_info_t* info, lcd_orientation_t lcd
* @method system_info_set_keyboard_type
*
*
* @param {system_info_t* info} info system_info对象
* @param {system_info_t*} info system_info对象
* @param {keyboard_type_t} keyboard_type
*
* @return {ret_t} RET_OK表示成功
@ -259,7 +259,7 @@ ret_t system_info_set_keyboard_type(system_info_t* info, keyboard_type_t keyboar
* @method system_info_set_device_pixel_ratio
* LCD密度
*
* @param {system_info_t* info} info system_info对象
* @param {system_info_t*} info system_info对象
* @param {float_t} device_pixel_ratio LCD密度
*
* @return {ret_t} RET_OK表示成功

View File

@ -84,7 +84,7 @@ typedef struct _text_edit_t {
* @method text_edit_create
* text_edit对象
* @param {widget_t*} widget
* @param {boo_t} single_line
* @param {bool_t} single_line
*
* @return {widget_t*}
*/
@ -225,7 +225,7 @@ ret_t text_edit_set_cursor(text_edit_t* text_edit, uint32_t cursor);
*
* @param {text_edit_t*} text_edit text_edit对象
*
* @return {uin32_t}
* @return {uint32_t}
*/
uint32_t text_edit_get_cursor(text_edit_t* text_edit);

View File

@ -49,7 +49,7 @@ typedef ret_t (*vgcanvas_asset_manager_font_destroy_t)(void* vg, const char* fon
* @alias vgcanvas_asset_manager_instance
* @annotation ["constructor", "scriptable"]
*
* @return {vgcanvas_asset_manager*}
* @return {vgcanvas_asset_manager_t*}
*/
vgcanvas_asset_manager_t* vgcanvas_asset_manager(void);

View File

@ -2521,7 +2521,7 @@ ret_t widget_dispatch_to_key_target(widget_t* widget, event_t* e);
* @param {xy_t} x x坐标
* @param {xy_t} y y坐标
*
* @return {widget*} NULL
* @return {widget_t*} NULL
*/
widget_t* widget_find_target(widget_t* widget, xy_t x, xy_t y);

View File

@ -44,6 +44,11 @@ ret_t widget_invalidate_default(widget_t* widget, const rect_t* rect);
/**
* @method widget_on_event_default
* @annotation ["global"]
*
* @param {widget_t*} widget
* @param {event_t*} e
*
* @return {ret_t} RET_OK表示成功
*/
ret_t widget_on_event_default(widget_t* widget, event_t* e);
@ -86,7 +91,7 @@ ret_t widget_on_paint_children_clip(widget_t* widget, canvas_t* c);
* @param {widget_t*} widget
* @param {rect_t*} clip clip区域(NULL时使用widget的区域)
* @param {canvas_t*} c
* @param (widget_on_paint_t} on_paint
* @param {widget_on_paint_t} on_paint
*
* @return {ret_t} RET_OK表示成功
*/

View File

@ -36,7 +36,7 @@ typedef tk_object_t* (*conf_load_t)(const char* url, bool_t create_if_not_exist)
*
* @annotation ["global"]
*
* @param {conf_loader_t} load
* @param {conf_load_t} load
* @param {const char*} app_name
* @param {const char*} extname
*

View File

@ -63,7 +63,7 @@ tk_object_t* conf_obj_create(conf_doc_save_t save, conf_doc_load_t load, const c
*
* @param {tk_object_t*} conf conf对象
*
* @return {conf_dot_t} doc对象
* @return {conf_doc_t*} doc对象
*
*/
conf_doc_t* conf_obj_get_doc(tk_object_t* conf);

View File

@ -1,129 +1,142 @@
? /**
/**
*
*
*/
/**
/**
* @method SDL_ShowCursor
*
* Toggle whether or not the cursor is shown.
* @annotation ["global"]
*
* @param {int} toggle 1 to show the cursor, 0 to hide it, -1 to query the current state.
* @return {int} 1 if the cursor is shown, or 0 if the cursor is hidden.
*/
/**
/**
* @method SDL_WarpMouseInWindow
*
* Moves the mouse to the given position within the window.
* @annotation ["global"]
*
* @param {SDL_Window*} window 1 to show the cursor, 0 to hide it, -1 to query the current state.
* @param {int} x The x coordinate within the window.
* @param {int} y The y coordinate within the window.
*/
/**
/**
* @method SDL_GetDefaultCursor
*
* Return the default cursor.
* @annotation ["global"]
*
* @return {SDL_Cursor*} the default cursor.
*/
/**
/**
* @method SDL_SetCursor
*
* Set the active cursor.
* @annotation ["global"]
*
* @param {SDL_Cursor*} cursor cursor.
*/
/**
/**
* @method SDL_FreeCursor
*
* Frees a cursor created with SDL_CreateCursor() or similar functions.
* @annotation ["global"]
*
* @param {SDL_Cursor*} cursor cursor.
*/
/**
/**
* @method SDL_CreateSystemCursor
*
* Create a system cursor.
* @annotation ["global"]
*
* @param {SDL_SystemCursor} id id.
* @return {SDL_Cursor*} the cursor.
*/
/**
/**
* @method SDL_GetMouseFocus
*
* Get the window which currently has mouse focus.
* @annotation ["global"]
*
* @return {SDL_Window*} the window.
*/
/**
/**
* @method SDL_MixAudioFormat
*
* @annotation ["global"]
*
* @param {Uint8*} dst
* @param {const Uint8*} src
* @param {SDL_AudioFormat} format
* @param {Uint32} len
* @param {int} volume
*/
/**
/**
* @method SDL_DequeueAudio
*
* @annotation ["global"]
*
* @param {SDL_AudioDeviceID} dev The device ID from which we will dequeue audio.
* @param {void*} data A pointer into where audio data should be copied.
* @param {Uint32} len The number of bytes (not samples!) to which (data) points.
* @return {Uint32} number of bytes dequeued, which could be less than requested.
*/
/**
/**
* @method SDL_QueueAudio
*
* @annotation ["global"]
*
* @param {SDL_AudioDeviceID} dev The device ID to which we will queue audio.
* @param {const void*} data The data to queue to the device for later playback.
* @param {Uint32} len The number of bytes (not samples!) to which (data) points.
* @return {Uint32} 0 on success, or -1 on error.
*/
/**
/**
* @method SDL_GetQueuedAudioSize
*
* @annotation ["global"]
*
* @param {SDL_AudioDeviceID} dev The device ID of which we will query queued audio size.
* @return {Uint32} Number of bytes (not samples!) of queued audio.
*/
/**
/**
* @method SDL_ClearQueuedAudio
*
* @annotation ["global"]
*
* @param {SDL_AudioDeviceID} dev The device ID of which to clear the audio queue.
*/
/**
/**
* @method SDL_PauseAudioDevice
*
* @annotation ["global"]
*
* @param {SDL_AudioDeviceID} dev
* @param {int} pause_on
*/
/**
/**
* @method SDL_CloseAudioDevice
*
* @annotation ["global"]
*
* @param {SDL_AudioDeviceID} dev
*/
/**
/**
* @method SDL_OpenAudioDevice
*
* @annotation ["global"]
*
* @param {const char*} device
* @param {int} iscapture
* @param {const SDL_AudioSpec*} desired
* @param {const SDL_AudioSpec*} obtained
* @param {int} allowed_changes
* @return {SDL_AudioDeviceID} 0 on error, a valid device ID that is >= 2 on success.
*/
/**
/**
* @method SDL_WasInit
*
* @annotation ["global"]
*
* @param {Uint32} flags
* @return {Uint32}
*/
/**
/**
* @method SDL_Init
*
* @annotation ["global"]
*
* @param {Uint32} flags
* @return {int}
*/
/**
/**
* @method SDL_GetError
*
* @annotation ["global"]
*
* @return {const char*}
*/

View File

@ -135,7 +135,7 @@ ret_t line_number_set_line_height(widget_t* widget, int32_t line_height);
ret_t line_number_set_yoffset(widget_t* widget, int32_t yoffset);
/**
* @method line_number_set_yoffset
* @method line_number_set_lines_of_each_row
* (row)(line)
* @param {widget_t*} widget
* @param {const uint32_t*} lines_of_each_row

View File

@ -150,7 +150,7 @@ struct _network_interface_t {
*
*
* @param {char *} interface
* @param {type} network_interface_type_t
* @param {network_interface_type_t} type
*
* @return {network_interface_t}
*/

View File

@ -52,7 +52,7 @@ struct _tk_iostream_mem_t {
* @param {void*} buff_in
* @param {uint32_t} size_in
* @param {void*} buff_out
* @param {uoutt32_t} size_out
* @param {uint32_t} size_out
* @param {bool_t} own_the_buff istream对象拥有buff
*
* @return {tk_iostream_t*} iostream对象

View File

@ -45,7 +45,7 @@ const uint8_t* bsvg_visit_path(const uint8_t* p, void* ctx, tk_visit_t on_path);
*
* @param {bsvg_t*} svg对象
* @param {const uint32_t*} data svg数据
* @param {size} size data长度
* @param {uint32_t} size data长度
*
* @return {bsvg_t*} svg
*/

View File

@ -54,7 +54,7 @@ data_reader_t* data_reader_mem_create(const char* memname);
* URL
* @annotation ["static"]
*
* @param {mem_t*} mem
* @param {const void*} mem
* @param {uint32_t} size
* @param {char*} url URL
*

View File

@ -120,7 +120,7 @@ ret_t idle_manager_dispatch(idle_manager_t* idle_manager);
ret_t idle_manager_remove_all(idle_manager_t* idle_manager);
/**
* @method idle_manager_remove_all
* @method idle_manager_remove_all_by_ctx
* idle
* @param {idle_manager_t*} idle_manager idle_manager_t管理器对象
* @param {void*} ctx idle回调函数的上下文

View File

@ -445,7 +445,7 @@ ret_t str_to_float(str_t* str, double* v);
ret_t str_encode_hex(str_t* str, const uint8_t* data, uint32_t size, const char* format);
/**
* @method str_encode_hex
* @method str_decode_hex
* 16
* @param {str_t*} str str对象
* @param {uint8_t*} data ()