diff --git a/dllexports/awtk.def b/dllexports/awtk.def index c9662d086..39b8c4f85 100644 --- a/dllexports/awtk.def +++ b/dllexports/awtk.def @@ -4,6 +4,16 @@ EXPORTS event_create event_destroy event_init + rect_create + rect_set + rect_cast + rect_destroy + rect_scale + rect_init + rect_merge + rect_contains + rect_fix + rect_intersect emitter_create emitter_init emitter_dispatch @@ -24,16 +34,6 @@ EXPORTS emitter_destroy emitter_cast emitter_forward - rect_create - rect_set - rect_cast - rect_destroy - rect_scale - rect_init - rect_merge - rect_contains - rect_fix - rect_intersect bitmap_create bitmap_create_ex bitmap_get_bpp @@ -50,55 +50,6 @@ EXPORTS bitmap_destroy_with_self bitmap_destroy bitmap_get_bpp_of_format - object_unref - object_ref - object_clone - object_create - object_get_type - object_get_desc - object_get_size - object_is_collection - object_set_name - object_compare - object_get_prop - object_get_prop_str - object_get_prop_pointer - object_get_prop_object - object_get_prop_int - object_get_prop_bool - object_get_prop_float - object_remove_prop - object_set_prop - object_set_prop_str - object_set_prop_pointer - object_set_prop_object - object_set_prop_int - object_set_prop_bool - object_set_prop_float - object_copy_prop - object_foreach_prop - object_has_prop - object_eval - object_can_exec - object_exec - object_notify_changed - object_has_prop_by_path - object_get_prop_by_path - object_get_prop_str_by_path - object_get_prop_pointer_by_path - object_get_prop_object_by_path - object_get_prop_int_by_path - object_get_prop_bool_by_path - object_get_prop_float_by_path - object_set_prop_by_path - object_set_prop_str_by_path - object_set_prop_pointer_by_path - object_set_prop_object_by_path - object_set_prop_int_by_path - object_set_prop_bool_by_path - object_set_prop_float_by_path - object_can_exec_by_path - object_exec_by_path value_set_bool value_bool value_set_int8 @@ -153,6 +104,55 @@ EXPORTS value_destroy value_reset value_cast + object_unref + object_ref + object_clone + object_create + object_get_type + object_get_desc + object_get_size + object_is_collection + object_set_name + object_compare + object_get_prop + object_get_prop_str + object_get_prop_pointer + object_get_prop_object + object_get_prop_int + object_get_prop_bool + object_get_prop_float + object_remove_prop + object_set_prop + object_set_prop_str + object_set_prop_pointer + object_set_prop_object + object_set_prop_int + object_set_prop_bool + object_set_prop_float + object_copy_prop + object_foreach_prop + object_has_prop + object_eval + object_can_exec + object_exec + object_notify_changed + object_has_prop_by_path + object_get_prop_by_path + object_get_prop_str_by_path + object_get_prop_pointer_by_path + object_get_prop_object_by_path + object_get_prop_int_by_path + object_get_prop_bool_by_path + object_get_prop_float_by_path + object_set_prop_by_path + object_set_prop_str_by_path + object_set_prop_pointer_by_path + object_set_prop_object_by_path + object_set_prop_int_by_path + object_set_prop_bool_by_path + object_set_prop_float_by_path + object_can_exec_by_path + object_exec_by_path tk_init tk_run tk_quit @@ -169,71 +169,6 @@ EXPORTS asset_loader_default_create asset_loader_zip_create asset_loader_zip_create_with_reader - asset_loader_create - asset_loader_load - asset_loader_exist - asset_loader_destroy - bidi_init - bidi_type_from_name - bidi_log2vis - bidi_deinit - canvas_offline_create - canvas_offline_clear_canvas - canvas_offline_begin_draw - canvas_offline_end_draw - canvas_offline_get_bitmap - canvas_offline_bitmap_move_to_new_bitmap - canvas_offline_flush_bitmap - canvas_offline_destroy - canvas_init - canvas_get_width - canvas_get_height - canvas_get_clip_rect - canvas_set_clip_rect - canvas_set_clip_rect_ex - canvas_set_fill_color - canvas_set_text_color - canvas_set_stroke_color - canvas_set_fill_color_str - canvas_set_text_color_str - canvas_set_stroke_color_str - canvas_set_global_alpha - canvas_translate - canvas_untranslate - canvas_draw_vline - canvas_draw_hline - canvas_draw_points - canvas_fill_rect - canvas_clear_rect - canvas_stroke_rect - canvas_set_font - canvas_set_text_align - canvas_measure_text - canvas_get_font_height - canvas_measure_utf8 - canvas_draw_text - canvas_draw_utf8 - canvas_draw_text_in_rect - canvas_draw_text_bidi_in_rect - canvas_draw_utf8_in_rect - canvas_draw_icon - canvas_draw_image - canvas_draw_image_ex - canvas_draw_image_ex2 - canvas_get_vgcanvas - canvas_cast - canvas_reset - canvas_draw_image_at - canvas_draw_line - canvas_set_font_manager - canvas_set_assets_manager - canvas_get_text_metrics - canvas_begin_frame - canvas_fill_rounded_rect - canvas_fill_rounded_rect_ex - canvas_stroke_rounded_rect - canvas_stroke_rounded_rect_ex - canvas_end_frame children_layouter_factory children_layouter_factory_set children_layouter_factory_create @@ -259,6 +194,7 @@ EXPORTS clip_board_destroy clip_board_set_text clip_board_get_text + tk_widgets_init dialog_highlighter_factory dialog_highlighter_factory_set dialog_highlighter_factory_create @@ -276,6 +212,8 @@ EXPORTS dialog_highlighter_draw_mask dialog_highlighter_is_dynamic dialog_highlighter_destroy + widget_animator_scroll_create + widget_animator_scroll_set_params asset_type_find_by_value find_item find_item_by_value @@ -285,6 +223,51 @@ EXPORTS event_recorder_player_start_play event_recorder_player_stop_record event_recorder_player_stop_play + widget_animator_prop2_create + widget_animator_prop2_set_params + widget_animator_prop_create + widget_animator_prop_set_params + ubjson_writer_init + ubjson_writer_write_key + ubjson_writer_write_null + ubjson_writer_write_noop + ubjson_writer_write_true + ubjson_writer_write_false + ubjson_writer_write_int + ubjson_writer_write_int8 + ubjson_writer_write_uint8 + ubjson_writer_write_int16 + ubjson_writer_write_int32 + ubjson_writer_write_int64 + ubjson_writer_write_float32 + ubjson_writer_write_float64 + ubjson_writer_write_char + ubjson_writer_write_str + ubjson_writer_write_str_len + ubjson_writer_write_object + ubjson_writer_write_array_begin + ubjson_writer_write_array_end + ubjson_writer_write_object_begin + ubjson_writer_write_object_end + ubjson_writer_write_data + ubjson_writer_write_kv_object_begin + ubjson_writer_write_kv_object + ubjson_writer_write_kv_int + ubjson_writer_write_kv_int64 + ubjson_writer_write_kv_float + ubjson_writer_write_kv_double + ubjson_writer_write_kv_bool + ubjson_writer_write_kv_str + ubjson_writer_write_kv_str_len + ubjson_writer_write_kv_value + ubjson_parse + ubjson_to_object + ubjson_dump + wcs_dup + wcs_len + wcs_cmp + wcs_cpy + wcs_chr font_loader_load font_manager font_manager_set @@ -325,6 +308,29 @@ EXPORTS idle_set_on_destroy idle_dispatch idle_count + wstr_init + wstr_set + wstr_clear + wstr_set_utf8 + wstr_get_utf8 + wstr_remove + wstr_insert + wstr_append + wstr_append_with_len + wstr_push + wstr_pop + wstr_push_int + wstr_equal + wstr_from_int + wstr_from_float + wstr_from_value + wstr_to_int + wstr_to_float + wstr_add_float + wstr_trim_float_zero + wstr_normalize_newline + wstr_count_char + wstr_reset image_loader_load image_loader_register image_loader_unregister @@ -350,6 +356,15 @@ EXPORTS input_engine_reset_input input_engine_input input_engine_search + waitable_ring_buffer_create + waitable_ring_buffer_read + waitable_ring_buffer_write + waitable_ring_buffer_destroy + waitable_action_queue_create + waitable_action_queue_recv + waitable_action_queue_send + waitable_action_queue_destroy + xml_builder_get_attr input_method_dispatch input_method_dispatch_to_widget input_method_on @@ -803,537 +818,6 @@ EXPORTS window_animator_end_frame window_animator_destroy window_animator_create - encoding_convert - encoding_utf8_to_gbk - encoding_gbk_to_utf8 - app_conf_init_ini - app_conf_init_json - app_conf_init_ubjson - app_conf_init - app_conf_set_instance - app_conf_get_instance - app_conf_save - app_conf_reload - app_conf_on_changed - app_conf_off_changed - app_conf_off_changed_by_ctx - app_conf_deinit - app_conf_set - app_conf_get - app_conf_exist - app_conf_set_int - app_conf_set_int64 - app_conf_set_bool - app_conf_set_double - app_conf_set_str - app_conf_set_wstr - app_conf_get_int - app_conf_get_int64 - app_conf_get_bool - app_conf_get_double - app_conf_get_str - app_conf_get_wstr - app_conf_remove - conf_doc_load_ini - conf_doc_save_ini - conf_doc_load_json - conf_doc_save_json - conf_doc_create - conf_doc_create_node - conf_doc_destroy_node - conf_doc_append_sibling - conf_doc_append_child - conf_doc_remove_sibling - conf_doc_remove_child - conf_doc_remove_child_by_name - conf_doc_remove_children - conf_doc_set - conf_doc_set_int - conf_doc_set_bool - conf_doc_set_float - conf_doc_set_str - conf_doc_get - conf_doc_get_int - conf_doc_get_bool - conf_doc_get_float - conf_doc_get_str - conf_doc_remove - conf_doc_clear - conf_doc_move_up - conf_doc_move_down - conf_doc_exists - conf_doc_is_first - conf_doc_is_last - conf_doc_add_child - conf_doc_destroy - conf_node_get_name - conf_node_find_child - conf_node_find_sibling - conf_node_set_value - conf_node_get_value - conf_node_get_first_child - conf_node_set_first_child - conf_doc_load_ubjson - conf_doc_save_ubjson - dialog_highlighter_default_create - SDL_ShowCursor - SDL_WarpMouseInWindow - SDL_GetDefaultCursor - SDL_SetCursor - SDL_FreeCursor - SDL_CreateSystemCursor - SDL_GetMouseFocus - SDL_MixAudioFormat - SDL_DequeueAudio - SDL_QueueAudio - SDL_GetQueuedAudioSize - SDL_ClearQueuedAudio - SDL_PauseAudioDevice - SDL_CloseAudioDevice - SDL_OpenAudioDevice - SDL_WasInit - SDL_Init - SDL_GetError - tk_ext_widgets_init - file_browser_create - file_browser_set_cwd - file_browser_create_dir - file_browser_create_file - file_browser_remove - file_browser_enter - file_browser_up - file_browser_refresh - file_browser_set_filter - file_browser_set_compare - file_browser_sort_by_name - file_browser_sort_by_type - file_browser_sort_by_size - file_browser_sort_by_mtime - file_browser_get_items_nr - file_browser_get_item - file_browser_set_ignore_hidden_files - file_browser_destroy - tk_ostream_serial_create - bsvg_to_svg - svg_to_bsvg - action_queue_create - action_queue_recv - action_queue_send - action_queue_destroy - bsvg_init - action_thread_pool_create - action_thread_pool_exec - action_thread_pool_destroy - action_thread_create - action_thread_create_with_queue - action_thread_exec - action_thread_set_on_idle - action_thread_set_on_quit - action_thread_destroy - asset_info_create - asset_info_destroy - asset_info_unref - asset_info_ref - asset_info_get_formatted_name - async_call - async_call_init - async_call_deinit - wbuffer_init - wbuffer_init_extendable - wbuffer_extend_capacity - wbuffer_deinit - wbuffer_skip - wbuffer_write_uint8 - wbuffer_write_uint16 - wbuffer_write_uint32 - wbuffer_write_float - wbuffer_write_binary - wbuffer_write_string - wbuffer_has_room - rbuffer_init - rbuffer_has_more - rbuffer_skip - rbuffer_read_uint8 - rbuffer_read_uint16 - rbuffer_read_uint32 - rbuffer_read_float - rbuffer_read_binary - rbuffer_read_string - rbuffer_peek_uint8 - rbuffer_peek_uint16 - rbuffer_peek_uint32 - color_parse - color_init - color_create - color_from_str - color_r - color_g - color_b - color_a - color_cast - color_destroy - color_hex_str - color_rgba_str - compressor_compress - compressor_uncompress - compressor_destroy - tk_cond_var_create - tk_cond_var_wait - tk_cond_var_awake - tk_cond_var_destroy - tk_cond_create - tk_cond_wait - tk_cond_wait_timeout - tk_cond_signal - tk_cond_destroy - darray_create - darray_init - darray_find - darray_bsearch_index - darray_bsearch - darray_get - darray_find_index - darray_remove - darray_remove_index - darray_remove_all - darray_sort - darray_find_all - darray_pop - darray_tail - darray_head - darray_push - darray_count - darray_clear - darray_foreach - darray_deinit - darray_destroy - data_reader_factory - data_reader_factory_set - data_reader_factory_create - data_reader_factory_register - data_reader_factory_create_reader - data_reader_factory_destroy - data_reader_read - data_reader_get_size - data_reader_destroy - data_reader_read_all - data_writer_factory - data_writer_factory_set - data_writer_factory_create - data_writer_factory_register - data_writer_factory_create_writer - data_writer_factory_destroy - data_writer_write - data_writer_destroy - date_time_create - date_time_init - date_time_set - date_time_from_time - date_time_add_delta - date_time_is_leap - date_time_get_days - date_time_get_wday - date_time_get_month_name - date_time_get_wday_name - date_time_destroy - date_time_global_init_ex - tk_dl_open - tk_dl_sym - tk_dl_close - easing_get - event_source_manager_init - event_source_manager_deinit - event_source_manager_get_wakeup_time - event_source_manager_dispatch - event_source_manager_add - event_source_manager_remove - event_source_manager_remove_by_tag - event_source_manager_destroy - fs_file_read - fs_file_read_line - fs_file_write - fs_file_printf - fs_file_seek - fs_file_truncate - fs_file_close - fs_file_sync - fs_file_stat - fs_file_eof - fs_file_tell - fs_file_size - fs_dir_rewind - fs_dir_read - fs_dir_close - fs_open_file - fs_remove_file - fs_file_exist - fs_file_rename - fs_open_dir - fs_change_dir - fs_create_dir - fs_remove_dir - fs_create_dir_r - fs_remove_dir_r - fs_dir_exist - fs_dir_rename - fs_get_file_size - fs_get_disk_info - fs_stat - fs_get_exe - fs_get_user_storage_path - fs_get_temp_path - fs_get_cwd - fs_build_user_storage_file_name - os_fs - file_exist - file_remove - file_get_size - file_read - file_read_part - file_write - fscript_create - fscript_exec - fscript_destroy - fscript_eval - fscript_global_init - fscript_register_func - fscript_global_deinit - func_call_parser_init - func_call_parser_parse - func_call_parser_deinit - func_call_parse - idle_manager - idle_manager_set - idle_manager_create - idle_manager_init - idle_manager_deinit - idle_manager_destroy - idle_manager_count - idle_manager_remove_all - idle_manager_remove - idle_manager_append - idle_manager_find - idle_manager_add - int_str_value - int_str_name - log_get_log_level - log_set_log_level - matrix_init - matrix_identity - matrix_invert - matrix_set - matrix_multiply - matrix_translate - matrix_scale - matrix_rotate - matrix_transform_point - tk_alloc - tk_calloc - tk_realloc - tk_free - tk_mem_dump - tk_mem_is_valid_addr - mmap_create - mmap_destroy - tk_mutex_nest_create - tk_mutex_nest_lock - tk_mutex_nest_try_lock - tk_mutex_nest_unlock - tk_mutex_nest_destroy - tk_mutex_create - tk_mutex_lock - tk_mutex_try_lock - tk_mutex_unlock - tk_mutex_destroy - named_value_create - named_value_init - named_value_cast - named_value_set_name - named_value_set_value - named_value_get_value - named_value_deinit - named_value_destroy - path_basename - path_extname - path_dirname - path_normalize - path_abs - path_is_abs - path_build - path_replace_basename - path_replace_extname - path_cwd - path_exe - path_app_root - path_exist - get_time_ms64 - get_time_us64 - sleep_ms - platform_prepare - plugin_manager_create - plugin_manager_refresh - plugin_manager_reload - plugin_manager_dump - plugin_manager_exist - plugin_manager_destroy - qaction_create - qaction_set_on_event - qaction_exec - qaction_notify - qaction_destroy - ring_buffer_create - ring_buffer_is_full - ring_buffer_is_empty - ring_buffer_size - ring_buffer_free_size - ring_buffer_capacity - ring_buffer_read - ring_buffer_peek - ring_buffer_write - ring_buffer_read_len - ring_buffer_skip - ring_buffer_write_len - ring_buffer_reset - ring_buffer_set_read_cursor - ring_buffer_set_read_cursor_delta - ring_buffer_set_write_cursor - ring_buffer_set_write_cursor_delta - ring_buffer_ensure_write_space - ring_buffer_destroy - rlog_create - rlog_write - rlog_print - rlog_destroy - rom_fopen - rom_fopen_buff - rom_ftell - rom_feof - rom_fseek - rom_fread - rom_fwrite - rom_fclose - tk_semaphore_create - tk_semaphore_wait - tk_semaphore_post - tk_semaphore_destroy - slist_create - slist_init - slist_find - slist_remove - slist_remove_all - slist_append - slist_prepend - slist_foreach - slist_tail_pop - slist_head_pop - slist_size - slist_count - slist_deinit - slist_destroy - socket_init - socket_deinit - socket_close - socket_bind - socket_wait_for_data - socket_set_blocking - socket_resolve - tcp_listen - tcp_accept - tcp_connect - udp_listen - udp_connect - tk_socketpair - str_str_value - str_str_name - str_init - str_extend - str_eq - str_set - str_clear - str_set_with_len - str_append - str_append_more - str_append_with_len - str_insert - str_insert_with_len - str_remove - str_append_char - str_append_int - str_append_double - str_append_json_str - str_append_json_int_pair - str_append_json_str_pair - str_append_json_double_pair - str_append_json_bool_pair - str_pop - str_unescape - str_decode_xml_entity - str_decode_xml_entity_with_len - str_from_int - str_from_float - str_from_value - str_from_wstr - str_from_wstr_with_len - str_to_int - str_to_float - str_encode_hex - str_end_with - str_start_with - str_trim - str_trim_left - str_trim_right - str_replace - str_to_lower - str_to_upper - str_expand_vars - str_reset - tk_thread_create - tk_thread_set_name - tk_thread_set_stack_size - tk_thread_set_priority - tk_thread_start - tk_thread_join - tk_thread_get_args - tk_thread_destroy - tk_thread_self - time_now_s - time_now_ms - time_now_us - timer_manager - timer_manager_set - timer_manager_create - timer_manager_init - timer_manager_deinit - timer_manager_destroy - timer_manager_add - timer_manager_remove - timer_manager_reset - timer_manager_find - timer_manager_count - timer_manager_next_time - timer_manager_append - tokenizer_init - tokenizer_init_ex - tokenizer_has_more - tokenizer_next - tokenizer_next_until - tokenizer_next_expr_until - tokenizer_next_int - tokenizer_next_float - tokenizer_deinit - url_create - url_set_schema - url_set_user_name - url_set_password - url_set_host - url_set_port - url_set_path - url_set_param - url_get_param - url_destroy - tk_utf8_from_utf16 - tk_utf8_from_utf16_ex - tk_utf8_to_utf16 tk_atoi tk_atob tk_atof @@ -1383,92 +867,865 @@ EXPORTS tk_wstr_count_c image_region_parse object_to_json - waitable_action_queue_create - waitable_action_queue_recv - waitable_action_queue_send - waitable_action_queue_destroy - waitable_ring_buffer_create - waitable_ring_buffer_read - waitable_ring_buffer_write - waitable_ring_buffer_destroy - wstr_init - wstr_set - wstr_clear - wstr_set_utf8 - wstr_get_utf8 - wstr_remove - wstr_insert - wstr_append - wstr_append_with_len - wstr_push - wstr_pop - wstr_push_int - wstr_equal - wstr_from_int - wstr_from_float - wstr_from_value - wstr_to_int - wstr_to_float - wstr_add_float - wstr_trim_float_zero - wstr_normalize_newline - wstr_count_char - wstr_reset - wcs_chr - wcs_cpy - wcs_cmp - wcs_len - wcs_dup - ubjson_parse - ubjson_to_object - ubjson_dump - ubjson_writer_init - ubjson_writer_write_key - ubjson_writer_write_null - ubjson_writer_write_noop - ubjson_writer_write_true - ubjson_writer_write_false - ubjson_writer_write_int - ubjson_writer_write_int8 - ubjson_writer_write_uint8 - ubjson_writer_write_int16 - ubjson_writer_write_int32 - ubjson_writer_write_int64 - ubjson_writer_write_float32 - ubjson_writer_write_float64 - ubjson_writer_write_char - ubjson_writer_write_str - ubjson_writer_write_str_len - ubjson_writer_write_object - ubjson_writer_write_array_begin - ubjson_writer_write_array_end - ubjson_writer_write_object_begin - ubjson_writer_write_object_end - ubjson_writer_write_data - ubjson_writer_write_kv_object_begin - ubjson_writer_write_kv_object - ubjson_writer_write_kv_int - ubjson_writer_write_kv_int64 - ubjson_writer_write_kv_float - ubjson_writer_write_kv_double - ubjson_writer_write_kv_bool - ubjson_writer_write_kv_str - ubjson_writer_write_kv_str_len - ubjson_writer_write_kv_value - widget_animator_prop_create - widget_animator_prop_set_params - widget_animator_prop2_create - widget_animator_prop2_set_params - widget_animator_scroll_create - widget_animator_scroll_set_params - tk_widgets_init - xml_builder_get_attr + tk_utf8_from_utf16 + tk_utf8_from_utf16_ex + tk_utf8_to_utf16 + encoding_convert + encoding_utf8_to_gbk + encoding_gbk_to_utf8 + url_create + url_set_schema + url_set_user_name + url_set_password + url_set_host + url_set_port + url_set_path + url_set_param + url_get_param + url_destroy + app_conf_init_ini + app_conf_init_json + app_conf_init_ubjson + app_conf_init + app_conf_set_instance + app_conf_get_instance + app_conf_save + app_conf_reload + app_conf_on_changed + app_conf_off_changed + app_conf_off_changed_by_ctx + app_conf_deinit + app_conf_set + app_conf_get + app_conf_exist + app_conf_set_int + app_conf_set_int64 + app_conf_set_bool + app_conf_set_double + app_conf_set_str + app_conf_set_wstr + app_conf_get_int + app_conf_get_int64 + app_conf_get_bool + app_conf_get_double + app_conf_get_str + app_conf_get_wstr + app_conf_remove + conf_doc_load_ini + conf_doc_save_ini + tokenizer_init + tokenizer_init_ex + tokenizer_has_more + tokenizer_next + tokenizer_next_until + tokenizer_next_expr_until + tokenizer_next_int + tokenizer_next_float + tokenizer_deinit + conf_doc_load_json + conf_doc_save_json + conf_doc_create + conf_doc_create_node + conf_doc_destroy_node + conf_doc_append_sibling + conf_doc_append_child + conf_doc_remove_sibling + conf_doc_remove_child + conf_doc_remove_child_by_name + conf_doc_remove_children + conf_doc_set + conf_doc_set_int + conf_doc_set_bool + conf_doc_set_float + conf_doc_set_str + conf_doc_get + conf_doc_get_int + conf_doc_get_bool + conf_doc_get_float + conf_doc_get_str + conf_doc_remove + conf_doc_clear + conf_doc_move_up + conf_doc_move_down + conf_doc_exists + conf_doc_is_first + conf_doc_is_last + conf_doc_add_child + conf_doc_destroy + conf_node_get_name + conf_node_find_child + conf_node_find_sibling + conf_node_set_value + conf_node_get_value + conf_node_get_first_child + conf_node_set_first_child + timer_manager + timer_manager_set + timer_manager_create + timer_manager_init + timer_manager_deinit + timer_manager_destroy + timer_manager_add + timer_manager_remove + timer_manager_reset + timer_manager_find + timer_manager_count + timer_manager_next_time + timer_manager_append + time_now_s + time_now_ms + time_now_us + conf_doc_load_ubjson + conf_doc_save_ubjson + tk_thread_create + tk_thread_set_name + tk_thread_set_stack_size + tk_thread_set_priority + tk_thread_start + tk_thread_join + tk_thread_get_args + tk_thread_destroy + tk_thread_self + str_init + str_extend + str_eq + str_set + str_clear + str_set_with_len + str_append + str_append_more + str_append_with_len + str_insert + str_insert_with_len + str_remove + str_append_char + str_append_int + str_append_double + str_append_json_str + str_append_json_int_pair + str_append_json_str_pair + str_append_json_double_pair + str_append_json_bool_pair + str_pop + str_unescape + str_decode_xml_entity + str_decode_xml_entity_with_len + str_from_int + str_from_float + str_from_value + str_from_wstr + str_from_wstr_with_len + str_to_int + str_to_float + str_encode_hex + str_end_with + str_start_with + str_trim + str_trim_left + str_trim_right + str_replace + str_to_lower + str_to_upper + str_expand_vars + str_reset + str_str_value + str_str_name + table_view_register + table_view_supported_render_mode + tk_socketpair + dialog_highlighter_default_create + SDL_ShowCursor + SDL_WarpMouseInWindow + SDL_GetDefaultCursor + SDL_SetCursor + SDL_FreeCursor + SDL_CreateSystemCursor + SDL_GetMouseFocus + SDL_MixAudioFormat + SDL_DequeueAudio + SDL_QueueAudio + SDL_GetQueuedAudioSize + SDL_ClearQueuedAudio + SDL_PauseAudioDevice + SDL_CloseAudioDevice + SDL_OpenAudioDevice + SDL_WasInit + SDL_Init + SDL_GetError + udp_listen + udp_connect + tcp_listen + tcp_accept + tcp_connect + socket_init + socket_deinit + socket_close + socket_bind + socket_wait_for_data + socket_set_blocking + socket_resolve + slist_create + slist_init + slist_find + slist_remove + slist_remove_all + slist_append + slist_prepend + slist_foreach + slist_tail_pop + slist_head_pop + slist_size + slist_count + slist_deinit + slist_destroy + tk_ext_widgets_init + tk_semaphore_create + tk_semaphore_wait + tk_semaphore_post + tk_semaphore_destroy + rom_fopen + rom_fopen_buff + rom_ftell + rom_feof + rom_fseek + rom_fread + rom_fwrite + rom_fclose + file_browser_create + file_browser_set_cwd + file_browser_create_dir + file_browser_create_file + file_browser_remove + file_browser_enter + file_browser_up + file_browser_refresh + file_browser_set_filter + file_browser_set_compare + file_browser_sort_by_name + file_browser_sort_by_type + file_browser_sort_by_size + file_browser_sort_by_mtime + file_browser_get_items_nr + file_browser_get_item + file_browser_set_ignore_hidden_files + file_browser_destroy + rlog_create + rlog_write + rlog_print + rlog_destroy + ring_buffer_create + ring_buffer_is_full + ring_buffer_is_empty + ring_buffer_size + ring_buffer_free_size + ring_buffer_capacity + ring_buffer_read + ring_buffer_peek + ring_buffer_write + ring_buffer_read_len + ring_buffer_skip + ring_buffer_write_len + ring_buffer_reset + ring_buffer_set_read_cursor + ring_buffer_set_read_cursor_delta + ring_buffer_set_write_cursor + ring_buffer_set_write_cursor_delta + ring_buffer_ensure_write_space + ring_buffer_destroy + bidi_init + bidi_type_from_name + bidi_log2vis + bidi_deinit xml_parser_create xml_parser_set_builder xml_parser_set_trim_text xml_parser_parse xml_parser_parse_file xml_parser_destroy + qaction_create + qaction_set_on_event + qaction_exec + qaction_notify + qaction_destroy + plugin_manager_create + plugin_manager_refresh + plugin_manager_reload + plugin_manager_dump + plugin_manager_exist + plugin_manager_destroy + get_time_ms64 + get_time_us64 + sleep_ms + platform_prepare + path_basename + path_extname + path_dirname + path_normalize + path_abs + path_is_abs + path_build + path_replace_basename + path_replace_extname + path_cwd + path_exe + path_app_root + path_exist + named_value_create + named_value_init + named_value_cast + named_value_set_name + named_value_set_value + named_value_get_value + named_value_deinit + named_value_destroy + tk_mutex_create + tk_mutex_lock + tk_mutex_try_lock + tk_mutex_unlock + tk_mutex_destroy + tk_mutex_nest_create + tk_mutex_nest_lock + tk_mutex_nest_try_lock + tk_mutex_nest_unlock + tk_mutex_nest_destroy + mmap_create + mmap_destroy + tk_alloc + tk_calloc + tk_realloc + tk_free + tk_mem_dump + tk_mem_is_valid_addr + matrix_init + matrix_identity + matrix_invert + matrix_set + matrix_multiply + matrix_translate + matrix_scale + matrix_rotate + matrix_transform_point + log_get_log_level + log_set_log_level + int_str_value + int_str_name + idle_manager + idle_manager_set + idle_manager_create + idle_manager_init + idle_manager_deinit + idle_manager_destroy + idle_manager_count + idle_manager_remove_all + idle_manager_remove + idle_manager_append + idle_manager_find + idle_manager_add + func_call_parser_init + func_call_parser_parse + func_call_parser_deinit + func_call_parse + fscript_create + fscript_exec + fscript_destroy + fscript_eval + fscript_global_init + fscript_register_func + fscript_global_deinit + fs_open_file + fs_remove_file + fs_file_exist + fs_file_rename + fs_open_dir + fs_change_dir + fs_create_dir + fs_remove_dir + fs_create_dir_r + fs_remove_dir_r + fs_dir_exist + fs_dir_rename + fs_get_file_size + fs_get_disk_info + fs_stat + fs_get_exe + fs_get_user_storage_path + fs_get_temp_path + fs_get_cwd + fs_build_user_storage_file_name + os_fs + file_exist + file_remove + file_get_size + file_read + file_read_part + file_write + fs_dir_rewind + fs_dir_read + fs_dir_close + fs_file_read + fs_file_read_line + fs_file_write + fs_file_printf + fs_file_seek + fs_file_truncate + fs_file_close + fs_file_sync + fs_file_stat + fs_file_eof + fs_file_tell + fs_file_size + canvas_offline_create + canvas_offline_clear_canvas + canvas_offline_begin_draw + canvas_offline_end_draw + canvas_offline_get_bitmap + canvas_offline_bitmap_move_to_new_bitmap + canvas_offline_flush_bitmap + canvas_offline_destroy + event_source_manager_init + event_source_manager_deinit + event_source_manager_get_wakeup_time + event_source_manager_dispatch + event_source_manager_add + event_source_manager_remove + event_source_manager_remove_by_tag + event_source_manager_destroy + canvas_init + canvas_get_width + canvas_get_height + canvas_get_clip_rect + canvas_set_clip_rect + canvas_set_clip_rect_ex + canvas_set_fill_color + canvas_set_text_color + canvas_set_stroke_color + canvas_set_fill_color_str + canvas_set_text_color_str + canvas_set_stroke_color_str + canvas_set_global_alpha + canvas_translate + canvas_untranslate + canvas_draw_vline + canvas_draw_hline + canvas_draw_points + canvas_fill_rect + canvas_clear_rect + canvas_stroke_rect + canvas_set_font + canvas_set_text_align + canvas_measure_text + canvas_get_font_height + canvas_measure_utf8 + canvas_draw_text + canvas_draw_utf8 + canvas_draw_text_in_rect + canvas_draw_text_bidi_in_rect + canvas_draw_utf8_in_rect + canvas_draw_icon + canvas_draw_image + canvas_draw_image_ex + canvas_draw_image_ex2 + canvas_get_vgcanvas + canvas_cast + canvas_reset + canvas_draw_image_at + canvas_draw_line + canvas_set_font_manager + canvas_set_assets_manager + canvas_get_text_metrics + canvas_begin_frame + canvas_fill_rounded_rect + canvas_fill_rounded_rect_ex + canvas_stroke_rounded_rect + canvas_stroke_rounded_rect_ex + canvas_end_frame + easing_get + tk_dl_open + tk_dl_sym + tk_dl_close + tk_dl_error + date_time_create + date_time_init + date_time_set + date_time_from_time + date_time_add_delta + date_time_is_leap + date_time_get_days + date_time_get_wday + date_time_get_month_name + date_time_get_wday_name + date_time_destroy + date_time_global_init_ex + asset_loader_create + asset_loader_load + asset_loader_exist + asset_loader_destroy + data_writer_write + data_writer_destroy + data_writer_factory + data_writer_factory_set + data_writer_factory_create + data_writer_factory_register + data_writer_factory_create_writer + data_writer_factory_destroy + data_reader_read + data_reader_get_size + data_reader_destroy + data_reader_read_all + data_reader_factory + data_reader_factory_set + data_reader_factory_create + data_reader_factory_register + data_reader_factory_create_reader + data_reader_factory_destroy + darray_create + darray_init + darray_find + darray_bsearch_index + darray_bsearch + darray_get + darray_find_index + darray_remove + darray_remove_index + darray_remove_all + darray_sort + darray_find_all + darray_pop + darray_tail + darray_head + darray_push + darray_count + darray_clear + darray_foreach + darray_deinit + darray_destroy + tk_cond_create + tk_cond_wait + tk_cond_wait_timeout + tk_cond_signal + tk_cond_destroy + tk_cond_var_create + tk_cond_var_wait + tk_cond_var_awake + tk_cond_var_destroy + compressor_compress + compressor_uncompress + compressor_destroy + color_init + color_create + color_from_str + color_r + color_g + color_b + color_a + color_cast + color_destroy + color_hex_str + color_rgba_str + color_parse + rbuffer_init + rbuffer_has_more + rbuffer_skip + rbuffer_read_uint8 + rbuffer_read_uint16 + rbuffer_read_uint32 + rbuffer_read_float + rbuffer_read_binary + rbuffer_read_string + rbuffer_peek_uint8 + rbuffer_peek_uint16 + rbuffer_peek_uint32 + wbuffer_init + wbuffer_init_extendable + wbuffer_extend_capacity + wbuffer_deinit + wbuffer_skip + wbuffer_write_uint8 + wbuffer_write_uint16 + wbuffer_write_uint32 + wbuffer_write_float + wbuffer_write_binary + wbuffer_write_string + wbuffer_has_room + async_call + async_call_init + async_call_deinit + asset_info_create + asset_info_destroy + asset_info_unref + asset_info_ref + asset_info_get_formatted_name + action_thread_create + action_thread_create_with_queue + action_thread_exec + action_thread_set_on_idle + action_thread_set_on_quit + action_thread_destroy + action_thread_pool_create + action_thread_pool_exec + action_thread_pool_destroy + bsvg_init + bsvg_to_svg + svg_to_bsvg + action_queue_create + action_queue_recv + action_queue_send + action_queue_destroy + tk_ostream_serial_create + candidates_create + candidates_cast + candidates_set_pre + candidates_set_select_by_num + candidates_set_auto_hide + candidates_set_button_style + self_layouter_menu_create + data_reader_asset_create + data_reader_asset_build_url + view_create + view_set_default_focused_child + view_cast + tab_control_create + tab_control_cast + tab_button_create + tab_button_cast + tab_button_set_value + tab_button_set_icon + tab_button_set_active_icon + tab_button_set_load_ui + tab_button_group_create + tab_button_group_set_compact + tab_button_group_set_scrollable + tab_button_group_cast + slider_create + slider_cast + slider_set_value + slider_set_min + slider_set_max + slider_set_step + slider_set_bar_size + slider_set_vertical + slider_set_value_internal + row_create + row_cast + progress_bar_create + progress_bar_cast + progress_bar_set_value + progress_bar_set_max + progress_bar_set_vertical + progress_bar_set_show_text + progress_bar_set_reverse + progress_bar_get_percent + pages_create + pages_cast + pages_set_active + pages_set_active_by_name + label_create + label_set_length + label_set_line_wrap + label_set_word_wrap + label_resize_to_content + label_cast + group_box_create + group_box_cast + lcd_mono_create + lcd_mem_special_create + lcd_mem_rgba8888_create + lcd_mem_rgba8888_create_single_fb + lcd_mem_rgba8888_create_double_fb + lcd_mem_rgba8888_create_three_fb + lcd_mem_rgb888_create + lcd_mem_rgb888_create_single_fb + lcd_mem_rgb888_create_double_fb + lcd_mem_rgb888_create_three_fb + lcd_mem_rgb565_create + lcd_mem_rgb565_create_single_fb + lcd_mem_rgb565_create_double_fb + lcd_mem_rgb565_create_three_fb + data_reader_file_create + data_reader_mem_create + data_reader_mem_build_url + lcd_mem_bgra8888_create + lcd_mem_bgra8888_create_single_fb + lcd_mem_bgra8888_create_double_fb + lcd_mem_bgra8888_create_three_fb + lcd_mem_bgr888_create + lcd_mem_bgr888_create_single_fb + lcd_mem_bgr888_create_double_fb + lcd_mem_bgr888_create_three_fb + data_writer_file_create + data_writer_wbuffer_create + data_writer_wbuffer_build_url + lcd_mem_bgr565_create + lcd_mem_bgr565_create_single_fb + lcd_mem_bgr565_create_double_fb + lcd_mem_bgr565_create_three_fb + self_layouter_default_create + children_layouter_default_create + input_method_sdl_create + input_method_null_create + input_method_default_create + event_source_manager_default_create + prop_change_event_cast + prop_change_event_init + progress_event_cast + progress_event_init + done_event_cast + done_event_init + error_event_cast + error_event_init + cmd_exec_event_cast + cmd_exec_event_init + image_loader_stb + stb_load_image + font_loader_stb + font_stb_create + font_loader_ft + font_loader_bitmap + time_clock_create + time_clock_cast + time_clock_set_hour + time_clock_set_minute + time_clock_set_second + time_clock_set_hour_image + time_clock_set_minute_image + time_clock_set_second_image + time_clock_set_bg_image + time_clock_set_image + time_clock_set_hour_anchor + time_clock_set_minute_anchor + time_clock_set_second_anchor + text_selector_create + text_selector_cast + text_selector_reset_options + text_selector_count_options + text_selector_append_option + text_selector_set_options + text_selector_set_range_options + text_selector_get_option + text_selector_get_value + text_selector_set_value + text_selector_get_text + text_selector_set_text + text_selector_set_selected_index + text_selector_set_visible_nr + text_selector_set_localize_options + text_selector_set_loop_options + text_selector_set_yspeed_scale + switch_create + switch_set_value + switch_cast + slide_view_create + slide_view_cast + slide_view_set_auto_play + slide_view_set_active + slide_view_set_active_ex + slide_view_set_vertical + slide_view_set_anim_hint + slide_view_set_loop + slide_indicator_create + slide_indicator_create_linear + slide_indicator_create_arc + slide_indicator_cast + slide_indicator_set_value + slide_indicator_set_max + slide_indicator_set_default_paint + slide_indicator_set_auto_hide + slide_indicator_set_margin + slide_indicator_set_spacing + slide_indicator_set_size + slide_indicator_set_anchor + slide_indicator_set_indicated_target + slide_menu_create + slide_menu_cast + slide_menu_set_value + slide_menu_set_align_v + slide_menu_set_min_scale + scroll_view_create + scroll_view_cast + scroll_view_set_virtual_w + scroll_view_set_virtual_h + scroll_view_set_xslidable + scroll_view_set_yslidable + scroll_view_set_snap_to_page + scroll_view_set_offset + scroll_view_set_speed_scale + scroll_view_scroll_to + scroll_view_scroll_delta_to + scroll_bar_create + scroll_bar_cast + scroll_bar_create_mobile + scroll_bar_create_desktop + scroll_bar_set_params + scroll_bar_scroll_to + scroll_bar_set_value + scroll_bar_add_delta + scroll_bar_scroll_delta + scroll_bar_set_value_only + scroll_bar_is_mobile + list_view_create + list_view_set_item_height + list_view_set_default_item_height + list_view_set_auto_hide_scroll_bar + list_view_cast + list_view_reinit + list_view_h_create + list_view_h_set_item_width + list_view_h_set_spacing + list_view_h_cast + list_item_create + list_item_cast + children_layouter_list_view_create + hscroll_label_create + hscroll_label_set_lull + hscroll_label_set_duration + hscroll_label_set_only_focus + hscroll_label_set_only_parent_focus + hscroll_label_set_loop + hscroll_label_set_yoyo + hscroll_label_set_ellipses + hscroll_label_set_xoffset + hscroll_label_start + hscroll_label_stop + hscroll_label_cast + rich_text_create + rich_text_set_text + rich_text_set_yslidable + rich_text_cast + rich_text_view_create + rich_text_view_cast + progress_circle_create + progress_circle_cast + progress_circle_set_value + progress_circle_set_max + progress_circle_set_line_width + progress_circle_set_start_angle + progress_circle_set_unit + progress_circle_set_line_cap + progress_circle_set_show_text + progress_circle_set_counter_clock_wise + mledit_create + mledit_set_readonly + mledit_set_cancelable + mledit_set_focus + mledit_set_wrap_word + mledit_set_max_lines + mledit_set_tips + mledit_set_tr_tips + mledit_set_keyboard + mledit_set_cursor + mledit_set_scroll_line + mledit_set_open_im_when_focused + mledit_set_close_im_when_blured + mledit_cast + line_number_create + line_number_set_top_margin + line_number_set_bottom_margin + line_number_set_line_height + line_number_set_yoffset + line_number_cast + lang_indicator_create + lang_indicator_set_image + lang_indicator_cast assets_manager assets_manager_set assets_manager_create @@ -1493,64 +1750,110 @@ EXPORTS assets_manager_deinit assets_manager_destroy assets_manager_load_file - data_reader_asset_create - data_reader_asset_build_url - wheel_event_cast - wheel_event_init - orientation_event_cast - orientation_event_init - value_change_event_cast - value_change_event_init - pointer_event_cast - pointer_event_init - key_event_cast - key_event_init - paint_event_cast - paint_event_init - window_event_cast - window_event_init - pointer_event_rotate - multi_gesture_event_cast - multi_gesture_event_init - window_event_init - image_base_set_image - image_base_set_rotation - image_base_set_scale - image_base_set_anchor - image_base_set_selected - image_base_set_selectable - image_base_set_clickable - image_base_cast - im_commit_event_init - style_const_create - style_mutable_set_name - style_mutable_set_int - style_mutable_set_color - style_mutable_set_str - style_mutable_foreach - style_mutable_get_value - style_mutable_set_value - style_mutable_copy - style_mutable_reset - style_mutable_cast - style_mutable_create - style_mutable_register - widget_factory - widget_factory_set - widget_factory_create - widget_factory_register - widget_factory_create_widget - widget_factory_destroy - window_base_on_destroy - window_base_on_event - window_base_invalidate - window_base_on_paint_begin - window_base_on_paint_end - window_base_on_paint_self - window_base_get_prop - window_base_set_prop - window_base_create - window_base_cast + image_value_create + image_value_set_image + image_value_set_format + image_value_set_click_add_delta + image_value_set_value + image_value_set_min + image_value_set_max + image_value_cast + image_animation_create + image_animation_set_loop + image_animation_set_image + image_animation_set_interval + image_animation_set_delay + image_animation_set_auto_play + image_animation_set_sequence + image_animation_set_range_sequence + image_animation_play + image_animation_stop + image_animation_pause + image_animation_next + image_animation_set_format + image_animation_set_unload_after_paint + image_animation_cast + image_animation_is_playing + guage_create + guage_cast + guage_set_image + guage_set_draw_type + guage_pointer_create + guage_pointer_cast + guage_pointer_set_angle + guage_pointer_set_image + guage_pointer_set_anchor + grid_create + grid_cast + file_chooser_create + file_chooser_set_init_dir + file_chooser_set_filter + file_chooser_cast + file_chooser_choose_file_for_save + file_chooser_choose_file_for_open + file_chooser_choose_folder + file_chooser_get_dir + file_chooser_get_filename + file_chooser_is_aborted + file_chooser_destroy + file_browser_view_create + file_browser_view_cast + file_browser_view_set_init_dir + file_browser_view_set_filter + file_browser_view_reload + file_browser_view_set_ignore_hidden_files + file_browser_view_set_sort_ascending + file_browser_view_set_show_check_button + file_browser_view_set_sort_by + file_browser_view_get_selected_items + file_browser_view_get_cwd + file_browser_view_create_dir + file_browser_view_create_file + draggable_create + draggable_cast + draggable_set_top + draggable_set_bottom + draggable_set_left + draggable_set_right + draggable_set_vertical_only + draggable_set_horizontal_only + draggable_set_drag_window + grid_item_create + grid_item_cast + color_picker_create + color_picker_set_color + color_picker_cast + color_component_create + color_component_set_color + color_component_set_hsv + color_component_get_h + color_component_get_s + color_component_get_v + color_component_cast + canvas_widget_create + canvas_widget_cast + table_view_create + table_view_cast + table_row_create + table_row_cast + table_row_set_index + table_header_create + table_header_cast + table_client_create + table_client_cast + table_client_set_row_height + table_client_set_rows + table_client_set_yoffset + table_client_set_yslidable + table_client_set_yspeed_scale + table_client_set_on_load_data + table_client_set_on_create_row + table_client_get_virtual_h + table_client_scroll_to_row + table_client_scroll_to_yoffset + table_client_ensure_children + table_client_reload + compressor_miniz_create window_manager window_manager_cast window_manager_set @@ -1577,296 +1880,67 @@ EXPORTS window_manager_end_wait_pointer_cursor window_manager_resize window_manager_close_all - compressor_miniz_create - canvas_widget_create - canvas_widget_cast - color_component_create - color_component_set_color - color_component_set_hsv - color_component_get_h - color_component_get_s - color_component_get_v - color_component_cast - color_picker_create - color_picker_set_color - color_picker_cast - draggable_create - draggable_cast - draggable_set_top - draggable_set_bottom - draggable_set_left - draggable_set_right - draggable_set_vertical_only - draggable_set_horizontal_only - draggable_set_drag_window - file_browser_view_create - file_browser_view_cast - file_browser_view_set_init_dir - file_browser_view_set_filter - file_browser_view_reload - file_browser_view_set_ignore_hidden_files - file_browser_view_set_sort_ascending - file_browser_view_set_show_check_button - file_browser_view_set_sort_by - file_browser_view_get_selected_items - file_browser_view_get_cwd - file_browser_view_create_dir - file_browser_view_create_file - file_chooser_create - file_chooser_set_init_dir - file_chooser_set_filter - file_chooser_cast - file_chooser_choose_file_for_save - file_chooser_choose_file_for_open - file_chooser_choose_folder - file_chooser_get_dir - file_chooser_get_filename - file_chooser_is_aborted - file_chooser_destroy - guage_pointer_create - guage_pointer_cast - guage_pointer_set_angle - guage_pointer_set_image - guage_pointer_set_anchor - guage_create - guage_cast - guage_set_image - guage_set_draw_type - image_animation_create - image_animation_set_loop - image_animation_set_image - image_animation_set_interval - image_animation_set_delay - image_animation_set_auto_play - image_animation_set_sequence - image_animation_set_range_sequence - image_animation_play - image_animation_stop - image_animation_pause - image_animation_next - image_animation_set_format - image_animation_set_unload_after_paint - image_animation_cast - image_animation_is_playing - image_value_create - image_value_set_image - image_value_set_format - image_value_set_click_add_delta - image_value_set_value - image_value_set_min - image_value_set_max - image_value_cast - candidates_create - candidates_cast - candidates_set_pre - candidates_set_select_by_num - candidates_set_auto_hide - candidates_set_button_style - lang_indicator_create - lang_indicator_set_image - lang_indicator_cast - line_number_create - line_number_set_top_margin - line_number_set_bottom_margin - line_number_set_line_height - line_number_set_yoffset - line_number_cast - mledit_create - mledit_set_readonly - mledit_set_cancelable - mledit_set_focus - mledit_set_wrap_word - mledit_set_max_lines - mledit_set_tips - mledit_set_tr_tips - mledit_set_keyboard - mledit_set_cursor - mledit_set_scroll_line - mledit_set_open_im_when_focused - mledit_set_close_im_when_blured - mledit_cast - progress_circle_create - progress_circle_cast - progress_circle_set_value - progress_circle_set_max - progress_circle_set_line_width - progress_circle_set_start_angle - progress_circle_set_unit - progress_circle_set_line_cap - progress_circle_set_show_text - progress_circle_set_counter_clock_wise - rich_text_view_create - rich_text_view_cast - rich_text_create - rich_text_set_text - rich_text_set_yslidable - rich_text_cast - hscroll_label_create - hscroll_label_set_lull - hscroll_label_set_duration - hscroll_label_set_only_focus - hscroll_label_set_only_parent_focus - hscroll_label_set_loop - hscroll_label_set_yoyo - hscroll_label_set_ellipses - hscroll_label_set_xoffset - hscroll_label_start - hscroll_label_stop - hscroll_label_cast - children_layouter_list_view_create - list_item_create - list_item_cast - list_view_h_create - list_view_h_set_item_width - list_view_h_set_spacing - list_view_h_cast - list_view_create - list_view_set_item_height - list_view_set_default_item_height - list_view_set_auto_hide_scroll_bar - list_view_cast - list_view_reinit - scroll_bar_create - scroll_bar_cast - scroll_bar_create_mobile - scroll_bar_create_desktop - scroll_bar_set_params - scroll_bar_scroll_to - scroll_bar_set_value - scroll_bar_add_delta - scroll_bar_scroll_delta - scroll_bar_set_value_only - scroll_bar_is_mobile - scroll_view_create - scroll_view_cast - scroll_view_set_virtual_w - scroll_view_set_virtual_h - scroll_view_set_xslidable - scroll_view_set_yslidable - scroll_view_set_snap_to_page - scroll_view_set_offset - scroll_view_set_speed_scale - scroll_view_scroll_to - scroll_view_scroll_delta_to - slide_menu_create - slide_menu_cast - slide_menu_set_value - slide_menu_set_align_v - slide_menu_set_min_scale - slide_indicator_create - slide_indicator_create_linear - slide_indicator_create_arc - slide_indicator_cast - slide_indicator_set_value - slide_indicator_set_max - slide_indicator_set_default_paint - slide_indicator_set_auto_hide - slide_indicator_set_margin - slide_indicator_set_spacing - slide_indicator_set_size - slide_indicator_set_anchor - slide_indicator_set_indicated_target - slide_view_create - slide_view_cast - slide_view_set_auto_play - slide_view_set_active - slide_view_set_active_ex - slide_view_set_vertical - slide_view_set_anim_hint - slide_view_set_loop - switch_create - switch_set_value - switch_cast - text_selector_create - text_selector_cast - text_selector_reset_options - text_selector_count_options - text_selector_append_option - text_selector_set_options - text_selector_set_range_options - text_selector_get_option - text_selector_get_value - text_selector_set_value - text_selector_get_text - text_selector_set_text - text_selector_set_selected_index - text_selector_set_visible_nr - text_selector_set_localize_options - text_selector_set_loop_options - text_selector_set_yspeed_scale - time_clock_create - time_clock_cast - time_clock_set_hour - time_clock_set_minute - time_clock_set_second - time_clock_set_hour_image - time_clock_set_minute_image - time_clock_set_second_image - time_clock_set_bg_image - time_clock_set_image - time_clock_set_hour_anchor - time_clock_set_minute_anchor - time_clock_set_second_anchor - font_loader_bitmap - font_loader_ft - font_loader_stb - font_stb_create - image_loader_stb - stb_load_image - input_method_default_create - input_method_null_create - input_method_sdl_create - children_layouter_default_create - self_layouter_default_create - self_layouter_menu_create - lcd_mem_bgr565_create - lcd_mem_bgr565_create_single_fb - lcd_mem_bgr565_create_double_fb - lcd_mem_bgr565_create_three_fb - lcd_mem_bgr888_create - lcd_mem_bgr888_create_single_fb - lcd_mem_bgr888_create_double_fb - lcd_mem_bgr888_create_three_fb - lcd_mem_bgra8888_create - lcd_mem_bgra8888_create_single_fb - lcd_mem_bgra8888_create_double_fb - lcd_mem_bgra8888_create_three_fb - lcd_mem_rgb565_create - lcd_mem_rgb565_create_single_fb - lcd_mem_rgb565_create_double_fb - lcd_mem_rgb565_create_three_fb - lcd_mem_rgb888_create - lcd_mem_rgb888_create_single_fb - lcd_mem_rgb888_create_double_fb - lcd_mem_rgb888_create_three_fb - lcd_mem_rgba8888_create - lcd_mem_rgba8888_create_single_fb - lcd_mem_rgba8888_create_double_fb - lcd_mem_rgba8888_create_three_fb - lcd_mem_special_create - lcd_mono_create - data_reader_file_create - data_reader_mem_create - data_reader_mem_build_url - data_writer_file_create - data_writer_wbuffer_create - data_writer_wbuffer_build_url - event_source_manager_default_create - prop_change_event_cast - prop_change_event_init - progress_event_cast - progress_event_init - done_event_cast - done_event_init - error_event_cast - error_event_init - cmd_exec_event_cast - cmd_exec_event_init + window_base_on_destroy + window_base_on_event + window_base_invalidate + window_base_on_paint_begin + window_base_on_paint_end + window_base_on_paint_self + window_base_get_prop + window_base_set_prop + window_base_create + window_base_cast + widget_factory + widget_factory_set + widget_factory_create + widget_factory_register + widget_factory_create_widget + widget_factory_destroy + style_mutable_set_name + style_mutable_set_int + style_mutable_set_color + style_mutable_set_str + style_mutable_foreach + style_mutable_get_value + style_mutable_set_value + style_mutable_copy + style_mutable_reset + style_mutable_cast + style_mutable_create + style_mutable_register + style_const_create + im_commit_event_init + image_base_set_image + image_base_set_rotation + image_base_set_scale + image_base_set_anchor + image_base_set_selected + image_base_set_selectable + image_base_set_clickable + image_base_cast + window_event_init + multi_gesture_event_cast + multi_gesture_event_init + window_event_cast + window_event_init + pointer_event_rotate + paint_event_cast + paint_event_init + key_event_cast + key_event_init + pointer_event_cast + pointer_event_init + value_change_event_cast + value_change_event_init ui_binary_writer_init ui_builder_default default_ui_loader xml_ui_loader ui_xml_writer_init + orientation_event_cast + orientation_event_init + wheel_event_cast + wheel_event_init app_bar_create app_bar_cast button_group_create @@ -1933,56 +2007,79 @@ EXPORTS edit_set_inc_value edit_set_dec_value edit_set_pre_input - grid_item_create - grid_item_cast - grid_create - grid_cast - group_box_create - group_box_cast - label_create - label_set_length - label_set_line_wrap - label_set_word_wrap - label_resize_to_content - label_cast - pages_create - pages_cast - pages_set_active - pages_set_active_by_name - progress_bar_create - progress_bar_cast - progress_bar_set_value - progress_bar_set_max - progress_bar_set_vertical - progress_bar_set_show_text - progress_bar_set_reverse - progress_bar_get_percent - row_create - row_cast - slider_create - slider_cast - slider_set_value - slider_set_min - slider_set_max - slider_set_step - slider_set_bar_size - slider_set_vertical - slider_set_value_internal - tab_button_group_create - tab_button_group_set_compact - tab_button_group_set_scrollable - tab_button_group_cast - tab_button_create - tab_button_cast - tab_button_set_value - tab_button_set_icon - tab_button_set_active_icon - tab_button_set_load_ui - tab_control_create - tab_control_cast - view_create - view_set_default_focused_child - view_cast + object_default_create + object_default_clone + object_default_unref + object_default_clear_props + object_default_find_prop + object_locker_create + conf_ubjson_create + conf_ubjson_load + conf_ubjson_save_as + timer_info_cast + conf_obj_create + conf_obj_get_doc + conf_obj_save + conf_obj_set_readonly + conf_json_create + conf_json_load + conf_json_save_as + conf_ini_create + conf_ini_load + conf_ini_save_as + mutable_image_create + mutable_image_set_prepare_image + mutable_image_set_create_image + mutable_image_set_framebuffer + mutable_image_cast + mutable_image_init + mutable_image_on_destroy + mutable_image_on_paint_self + window_create + window_create_default + window_set_fullscreen + window_open + window_open_and_close + window_close + window_close_force + window_cast + image_fill + image_clear + image_copy + image_rotate + image_blend + gif_image_create + gif_image_cast + tk_ostream_write + tk_ostream_seek + tk_ostream_write_len + tk_ostream_write_byte + tk_ostream_flush + system_info + system_info_init + system_info_deinit + system_info_set_font_scale + system_info_set_app_root + system_info_set_default_font + system_info_set_lcd_w + system_info_set_lcd_h + system_info_set_lcd_type + system_info_set_lcd_orientation + system_info_set_device_pixel_ratio + system_info_fix_font_name + system_info_create + event_source_fd_create + keyboard_create + keyboard_close + keyboard_cast + event_source_idle_create + popup_create + popup_cast + popup_set_close_when_click + popup_set_close_when_click_outside + popup_set_close_when_timeout + system_bar_create + system_bar_cast dialog_create dialog_create_simple dialog_cast @@ -1998,82 +2095,44 @@ EXPORTS dialog_info dialog_warn dialog_confirm - native_window_move - native_window_resize - native_window_minimize - native_window_maximize - native_window_restore - native_window_center - native_window_show_border - native_window_set_fullscreen - native_window_set_cursor - native_window_get_canvas - native_window_create - native_window_invalidate - system_info - system_info_init - system_info_deinit - system_info_set_font_scale - system_info_set_app_root - system_info_set_default_font - system_info_set_lcd_w - system_info_set_lcd_h - system_info_set_lcd_type - system_info_set_lcd_orientation - system_info_set_device_pixel_ratio - system_info_fix_font_name - system_info_create - window_create - window_create_default - window_set_fullscreen - window_open - window_open_and_close - window_close - window_close_force - window_cast - image_fill - image_clear - image_copy - image_rotate - image_blend - conf_ini_create - conf_ini_load - conf_ini_save_as - conf_json_create - conf_json_load - conf_json_save_as - conf_obj_create - conf_obj_get_doc - conf_obj_save - conf_obj_set_readonly - conf_ubjson_create - conf_ubjson_load - conf_ubjson_save_as - gif_image_create - gif_image_cast - keyboard_create - keyboard_close - keyboard_cast - mutable_image_create - mutable_image_set_prepare_image - mutable_image_set_create_image - mutable_image_set_framebuffer - mutable_image_cast - mutable_image_init - mutable_image_on_destroy - mutable_image_on_paint_self - svg_image_create - svg_image_set_image - svg_image_cast - event_source_fd_create - event_source_idle_create event_source_timer_create event_source_get_fd event_source_dispatch event_source_set_tag event_source_check event_source_get_wakeup_time + overlay_create + overlay_set_click_through + overlay_set_always_on_top + overlay_cast + calibration_win_create + calibration_win_set_on_done + calibration_win_set_on_click + calibration_win_cast + svg_image_create + svg_image_set_image + svg_image_cast + spin_box_create + spin_box_cast idle_info_cast + image_create + image_set_draw_type + image_cast + combo_box_create + combo_box_cast + combo_box_set_open_window + combo_box_reset_options + combo_box_count_options + combo_box_set_selected_index + combo_box_set_localize_options + combo_box_set_value + combo_box_set_item_height + combo_box_append_option + combo_box_set_options + combo_box_set_custom_open_popup + combo_box_get_option + combo_box_get_value + combo_box_get_text tk_iostream_get_istream tk_iostream_get_ostream tk_iostream_read @@ -2093,54 +2152,22 @@ EXPORTS object_array_clone object_array_unref object_array_clear_props + native_window_move + native_window_resize + native_window_minimize + native_window_maximize + native_window_restore + native_window_center + native_window_show_border + native_window_set_fullscreen + native_window_set_cursor + native_window_get_canvas + native_window_create + native_window_invalidate object_compositor_create - object_default_create - object_default_clone - object_default_unref - object_default_clear_props - object_default_find_prop - object_locker_create - tk_ostream_write - tk_ostream_seek - tk_ostream_write_len - tk_ostream_write_byte - tk_ostream_flush - timer_info_cast - calibration_win_create - calibration_win_set_on_done - calibration_win_set_on_click - calibration_win_cast - combo_box_create - combo_box_cast - combo_box_set_open_window - combo_box_reset_options - combo_box_count_options - combo_box_set_selected_index - combo_box_set_localize_options - combo_box_set_value - combo_box_set_item_height - combo_box_append_option - combo_box_set_options - combo_box_set_custom_open_popup - combo_box_get_option - combo_box_get_value - combo_box_get_text - image_create - image_set_draw_type - image_cast - overlay_create - overlay_set_click_through - overlay_set_always_on_top - overlay_cast - popup_create - popup_cast - popup_set_close_when_click - popup_set_close_when_click_outside - popup_set_close_when_timeout - spin_box_create - spin_box_cast - system_bar_create - system_bar_cast + tk_ostream_udp_create + tk_ostream_udp_set_target_with_host + tk_ostream_udp_set_target_with_addr combo_box_ex_create tk_istream_buffered_create tk_ostream_buffered_create @@ -2156,9 +2183,7 @@ EXPORTS tk_istream_udp_set_target_with_host tk_istream_udp_set_target_with_addr tk_ostream_tcp_create - tk_ostream_udp_create - tk_ostream_udp_set_target_with_host - tk_ostream_udp_set_target_with_addr + tk_iostream_shdlc_create tk_iostream_mem_create tk_istream_mem_create tk_ostream_mem_create @@ -2171,7 +2196,6 @@ EXPORTS tk_ostream_noisy_create tk_iostream_serial_create tk_iostream_serial_config - tk_istream_serial_create - tk_iostream_shdlc_create - tk_istream_shdlc_create tk_ostream_shdlc_create + tk_istream_shdlc_create + tk_istream_serial_create diff --git a/dllexports/tkc.def b/dllexports/tkc.def index 19e7ac90f..27a067d51 100644 --- a/dllexports/tkc.def +++ b/dllexports/tkc.def @@ -34,55 +34,6 @@ EXPORTS rect_contains rect_fix rect_intersect - object_unref - object_ref - object_clone - object_create - object_get_type - object_get_desc - object_get_size - object_is_collection - object_set_name - object_compare - object_get_prop - object_get_prop_str - object_get_prop_pointer - object_get_prop_object - object_get_prop_int - object_get_prop_bool - object_get_prop_float - object_remove_prop - object_set_prop - object_set_prop_str - object_set_prop_pointer - object_set_prop_object - object_set_prop_int - object_set_prop_bool - object_set_prop_float - object_copy_prop - object_foreach_prop - object_has_prop - object_eval - object_can_exec - object_exec - object_notify_changed - object_has_prop_by_path - object_get_prop_by_path - object_get_prop_str_by_path - object_get_prop_pointer_by_path - object_get_prop_object_by_path - object_get_prop_int_by_path - object_get_prop_bool_by_path - object_get_prop_float_by_path - object_set_prop_by_path - object_set_prop_str_by_path - object_set_prop_pointer_by_path - object_set_prop_object_by_path - object_set_prop_int_by_path - object_set_prop_bool_by_path - object_set_prop_float_by_path - object_can_exec_by_path - object_exec_by_path value_set_bool value_bool value_set_int8 @@ -137,15 +88,59 @@ EXPORTS value_destroy value_reset value_cast - action_thread_pool_create - action_thread_pool_exec - action_thread_pool_destroy - action_thread_create - action_thread_create_with_queue - action_thread_exec - action_thread_set_on_idle - action_thread_set_on_quit - action_thread_destroy + object_unref + object_ref + object_clone + object_create + object_get_type + object_get_desc + object_get_size + object_is_collection + object_set_name + object_compare + object_get_prop + object_get_prop_str + object_get_prop_pointer + object_get_prop_object + object_get_prop_int + object_get_prop_bool + object_get_prop_float + object_remove_prop + object_set_prop + object_set_prop_str + object_set_prop_pointer + object_set_prop_object + object_set_prop_int + object_set_prop_bool + object_set_prop_float + object_copy_prop + object_foreach_prop + object_has_prop + object_eval + object_can_exec + object_exec + object_notify_changed + object_has_prop_by_path + object_get_prop_by_path + object_get_prop_str_by_path + object_get_prop_pointer_by_path + object_get_prop_object_by_path + object_get_prop_int_by_path + object_get_prop_bool_by_path + object_get_prop_float_by_path + object_set_prop_by_path + object_set_prop_str_by_path + object_set_prop_pointer_by_path + object_set_prop_object_by_path + object_set_prop_int_by_path + object_set_prop_bool_by_path + object_set_prop_float_by_path + object_can_exec_by_path + object_exec_by_path + rlog_create + rlog_write + rlog_print + rlog_destroy asset_info_create asset_info_destroy asset_info_unref @@ -229,6 +224,14 @@ EXPORTS data_reader_factory_register data_reader_factory_create_reader data_reader_factory_destroy + conf_doc_load_ubjson + conf_node_get_name + conf_node_find_child + conf_node_find_sibling + conf_node_set_value + conf_node_get_value + conf_node_get_first_child + conf_node_set_first_child data_reader_read data_reader_get_size data_reader_destroy @@ -256,7 +259,41 @@ EXPORTS tk_dl_open tk_dl_sym tk_dl_close + tk_dl_error easing_get + action_thread_pool_create + action_thread_pool_exec + action_thread_pool_destroy + conf_doc_create + conf_doc_create_node + conf_doc_destroy_node + conf_doc_append_sibling + conf_doc_append_child + conf_doc_remove_sibling + conf_doc_remove_child + conf_doc_remove_child_by_name + conf_doc_remove_children + conf_doc_set + conf_doc_set_int + conf_doc_set_bool + conf_doc_set_float + conf_doc_set_str + conf_doc_get + conf_doc_get_int + conf_doc_get_bool + conf_doc_get_float + conf_doc_get_str + conf_doc_remove + conf_doc_clear + conf_doc_move_up + conf_doc_move_down + conf_doc_exists + conf_doc_is_first + conf_doc_is_last + conf_doc_add_child + conf_doc_destroy + conf_doc_save_json + conf_doc_load_json event_source_manager_init event_source_manager_deinit event_source_manager_get_wakeup_time @@ -265,6 +302,36 @@ EXPORTS event_source_manager_remove event_source_manager_remove_by_tag event_source_manager_destroy + conf_doc_save_ini + conf_doc_load_ini + app_conf_set_instance + app_conf_get_instance + app_conf_save + app_conf_reload + app_conf_on_changed + app_conf_off_changed + app_conf_off_changed_by_ctx + app_conf_deinit + app_conf_set + app_conf_get + app_conf_exist + app_conf_set_int + app_conf_set_int64 + app_conf_set_bool + app_conf_set_double + app_conf_set_str + app_conf_set_wstr + app_conf_get_int + app_conf_get_int64 + app_conf_get_bool + app_conf_get_double + app_conf_get_str + app_conf_get_wstr + app_conf_remove + app_conf_init + app_conf_init_ubjson + app_conf_init_json + app_conf_init_ini fs_file_read fs_file_read_line fs_file_write @@ -318,6 +385,7 @@ EXPORTS func_call_parser_parse func_call_parser_deinit func_call_parse + tk_ostream_serial_create idle_manager idle_manager_set idle_manager_create @@ -332,6 +400,39 @@ EXPORTS idle_manager_add int_str_value int_str_name + ubjson_writer_init + ubjson_writer_write_key + ubjson_writer_write_null + ubjson_writer_write_noop + ubjson_writer_write_true + ubjson_writer_write_false + ubjson_writer_write_int + ubjson_writer_write_int8 + ubjson_writer_write_uint8 + ubjson_writer_write_int16 + ubjson_writer_write_int32 + ubjson_writer_write_int64 + ubjson_writer_write_float32 + ubjson_writer_write_float64 + ubjson_writer_write_char + ubjson_writer_write_str + ubjson_writer_write_str_len + ubjson_writer_write_object + ubjson_writer_write_array_begin + ubjson_writer_write_array_end + ubjson_writer_write_object_begin + ubjson_writer_write_object_end + ubjson_writer_write_data + ubjson_writer_write_kv_object_begin + ubjson_writer_write_kv_object + ubjson_writer_write_kv_int + ubjson_writer_write_kv_int64 + ubjson_writer_write_kv_float + ubjson_writer_write_kv_double + ubjson_writer_write_kv_bool + ubjson_writer_write_kv_str + ubjson_writer_write_kv_str_len + ubjson_writer_write_kv_value log_get_log_level log_set_log_level matrix_init @@ -343,6 +444,14 @@ EXPORTS matrix_scale matrix_rotate matrix_transform_point + ubjson_parse + ubjson_to_object + ubjson_dump + wcs_dup + wcs_len + wcs_cmp + wcs_cpy + wcs_chr tk_alloc tk_calloc tk_realloc @@ -369,6 +478,37 @@ EXPORTS named_value_get_value named_value_deinit named_value_destroy + wstr_init + wstr_set + wstr_clear + wstr_set_utf8 + wstr_get_utf8 + wstr_remove + wstr_insert + wstr_append + wstr_append_with_len + wstr_push + wstr_pop + wstr_push_int + wstr_equal + wstr_from_int + wstr_from_float + wstr_from_value + wstr_to_int + wstr_to_float + wstr_add_float + wstr_trim_float_zero + wstr_normalize_newline + wstr_count_char + wstr_reset + waitable_ring_buffer_create + waitable_ring_buffer_read + waitable_ring_buffer_write + waitable_ring_buffer_destroy + waitable_action_queue_create + waitable_action_queue_recv + waitable_action_queue_send + waitable_action_queue_destroy path_basename path_extname path_dirname @@ -416,10 +556,12 @@ EXPORTS ring_buffer_set_write_cursor_delta ring_buffer_ensure_write_space ring_buffer_destroy - rlog_create - rlog_write - rlog_print - rlog_destroy + action_thread_create + action_thread_create_with_queue + action_thread_exec + action_thread_set_on_idle + action_thread_set_on_quit + action_thread_destroy rom_fopen rom_fopen_buff rom_ftell @@ -599,147 +741,6 @@ EXPORTS tk_wstr_count_c image_region_parse object_to_json - waitable_action_queue_create - waitable_action_queue_recv - waitable_action_queue_send - waitable_action_queue_destroy - waitable_ring_buffer_create - waitable_ring_buffer_read - waitable_ring_buffer_write - waitable_ring_buffer_destroy - wstr_init - wstr_set - wstr_clear - wstr_set_utf8 - wstr_get_utf8 - wstr_remove - wstr_insert - wstr_append - wstr_append_with_len - wstr_push - wstr_pop - wstr_push_int - wstr_equal - wstr_from_int - wstr_from_float - wstr_from_value - wstr_to_int - wstr_to_float - wstr_add_float - wstr_trim_float_zero - wstr_normalize_newline - wstr_count_char - wstr_reset - wcs_chr - wcs_cpy - wcs_cmp - wcs_len - wcs_dup - ubjson_parse - ubjson_to_object - ubjson_dump - ubjson_writer_init - ubjson_writer_write_key - ubjson_writer_write_null - ubjson_writer_write_noop - ubjson_writer_write_true - ubjson_writer_write_false - ubjson_writer_write_int - ubjson_writer_write_int8 - ubjson_writer_write_uint8 - ubjson_writer_write_int16 - ubjson_writer_write_int32 - ubjson_writer_write_int64 - ubjson_writer_write_float32 - ubjson_writer_write_float64 - ubjson_writer_write_char - ubjson_writer_write_str - ubjson_writer_write_str_len - ubjson_writer_write_object - ubjson_writer_write_array_begin - ubjson_writer_write_array_end - ubjson_writer_write_object_begin - ubjson_writer_write_object_end - ubjson_writer_write_data - ubjson_writer_write_kv_object_begin - ubjson_writer_write_kv_object - ubjson_writer_write_kv_int - ubjson_writer_write_kv_int64 - ubjson_writer_write_kv_float - ubjson_writer_write_kv_double - ubjson_writer_write_kv_bool - ubjson_writer_write_kv_str - ubjson_writer_write_kv_str_len - ubjson_writer_write_kv_value - tk_ostream_serial_create - app_conf_init_ini - app_conf_init_json - app_conf_init_ubjson - app_conf_init - app_conf_set_instance - app_conf_get_instance - app_conf_save - app_conf_reload - app_conf_on_changed - app_conf_off_changed - app_conf_off_changed_by_ctx - app_conf_deinit - app_conf_set - app_conf_get - app_conf_exist - app_conf_set_int - app_conf_set_int64 - app_conf_set_bool - app_conf_set_double - app_conf_set_str - app_conf_set_wstr - app_conf_get_int - app_conf_get_int64 - app_conf_get_bool - app_conf_get_double - app_conf_get_str - app_conf_get_wstr - app_conf_remove - conf_doc_load_ini - conf_doc_save_ini - conf_doc_load_json - conf_doc_save_json - conf_doc_create - conf_doc_create_node - conf_doc_destroy_node - conf_doc_append_sibling - conf_doc_append_child - conf_doc_remove_sibling - conf_doc_remove_child - conf_doc_remove_child_by_name - conf_doc_remove_children - conf_doc_set - conf_doc_set_int - conf_doc_set_bool - conf_doc_set_float - conf_doc_set_str - conf_doc_get - conf_doc_get_int - conf_doc_get_bool - conf_doc_get_float - conf_doc_get_str - conf_doc_remove - conf_doc_clear - conf_doc_move_up - conf_doc_move_down - conf_doc_exists - conf_doc_is_first - conf_doc_is_last - conf_doc_add_child - conf_doc_destroy - conf_node_get_name - conf_node_find_child - conf_node_find_sibling - conf_node_set_value - conf_node_get_value - conf_node_get_first_child - conf_node_set_first_child - conf_doc_load_ubjson conf_doc_save_ubjson data_reader_file_create data_reader_mem_create @@ -758,21 +759,9 @@ EXPORTS error_event_init cmd_exec_event_cast cmd_exec_event_init - event_source_fd_create - event_source_idle_create - event_source_timer_create - event_source_get_fd - event_source_dispatch - event_source_set_tag - event_source_check - event_source_get_wakeup_time + object_compositor_create + timer_info_cast idle_info_cast - tk_iostream_get_istream - tk_iostream_get_ostream - tk_iostream_read - tk_iostream_read_len - tk_iostream_write - tk_iostream_write_len tk_istream_read tk_istream_seek tk_istream_tell @@ -786,7 +775,26 @@ EXPORTS object_array_clone object_array_unref object_array_clear_props - object_compositor_create + conf_ini_create + conf_ini_load + conf_ini_save_as + event_source_get_fd + event_source_dispatch + event_source_set_tag + event_source_check + event_source_get_wakeup_time + event_source_timer_create + conf_json_create + conf_json_load + conf_json_save_as + tk_iostream_get_istream + tk_iostream_get_ostream + tk_iostream_read + tk_iostream_read_len + tk_iostream_write + tk_iostream_write_len + event_source_idle_create + event_source_fd_create object_default_create object_default_clone object_default_unref @@ -798,13 +806,6 @@ EXPORTS tk_ostream_write_len tk_ostream_write_byte tk_ostream_flush - timer_info_cast - conf_ini_create - conf_ini_load - conf_ini_save_as - conf_json_create - conf_json_load - conf_json_save_as conf_obj_create conf_obj_get_doc conf_obj_save @@ -812,19 +813,15 @@ EXPORTS conf_ubjson_create conf_ubjson_load conf_ubjson_save_as - tk_istream_buffered_create - tk_ostream_buffered_create - tk_ostream_buffered_get_size tk_istream_file_create - tk_ostream_file_create - tk_ostream_file_create_ex - tk_iostream_tcp_create + tk_ostream_shdlc_create tk_iostream_udp_create_client tk_iostream_udp_create - tk_istream_tcp_create - tk_istream_udp_create - tk_istream_udp_set_target_with_host - tk_istream_udp_set_target_with_addr + tk_ostream_buffered_create + tk_ostream_buffered_get_size + tk_istream_buffered_create + tk_ostream_file_create + tk_ostream_file_create_ex tk_ostream_tcp_create tk_ostream_udp_create tk_ostream_udp_set_target_with_host @@ -832,6 +829,7 @@ EXPORTS tk_iostream_mem_create tk_istream_mem_create tk_ostream_mem_create + tk_iostream_tcp_create tk_ostream_retry_create tk_ostream_retry_set_max_retry_times tk_ostream_retry_set_max_buffer_size @@ -842,6 +840,9 @@ EXPORTS tk_iostream_serial_create tk_iostream_serial_config tk_istream_serial_create + tk_istream_tcp_create tk_iostream_shdlc_create tk_istream_shdlc_create - tk_ostream_shdlc_create + tk_istream_udp_create + tk_istream_udp_set_target_with_host + tk_istream_udp_set_target_with_addr diff --git a/src/platforms/pc/dl.c b/src/platforms/pc/dl.c index f05e3e586..053bd9843 100644 --- a/src/platforms/pc/dl.c +++ b/src/platforms/pc/dl.c @@ -62,6 +62,10 @@ ret_t tk_dl_close(tk_dl_t* dl) { return RET_OK; } +const char* tk_dl_error(void) { + return dlerror(); +} + #elif defined(WIN32) struct _tk_dl_t { HMODULE h; @@ -92,6 +96,10 @@ void* tk_dl_sym(tk_dl_t* dl, const char* name) { return GetProcAddress(dl->h, name); } +const char* tk_dl_error(void) { + return NULL; +} + ret_t tk_dl_close(tk_dl_t* dl) { return_value_if_fail(dl != NULL && dl->h != NULL, RET_BAD_PARAMS); FreeLibrary(dl->h); diff --git a/src/tkc/dl.h b/src/tkc/dl.h index c38519ca2..b75a302b0 100644 --- a/src/tkc/dl.h +++ b/src/tkc/dl.h @@ -62,6 +62,14 @@ void* tk_dl_sym(tk_dl_t* dl, const char* name); */ ret_t tk_dl_close(tk_dl_t* dl); +/** + * @method tk_dl_error + * Show last error + * + * @return {const char*} 返回error message. + */ +const char* tk_dl_error(void); + #ifndef TK_DLL_EXT_NAME #ifdef WIN32 diff --git a/src/tkc/plugin_manager.c b/src/tkc/plugin_manager.c index 85d32e91a..3c6afee64 100644 --- a/src/tkc/plugin_manager.c +++ b/src/tkc/plugin_manager.c @@ -93,6 +93,10 @@ static plugin_t* plugin_create(const char* path, const char* lib_name, path_build(filename, MAX_PATH, path, lib_name, NULL); handle = tk_dl_open(filename); + + if (handle == NULL) { + log_debug("dlopen %s failed: %s\n", filename, tk_dl_error()); + } return_value_if_fail(handle != NULL, NULL); plugin = TKMEM_ZALLOC(plugin_t); diff --git a/tools/idl_gen/idl.json b/tools/idl_gen/idl.json index 5d2057da8..62b9e3fcd 100644 --- a/tools/idl_gen/idl.json +++ b/tools/idl_gen/idl.json @@ -133,6 +133,368 @@ }, "level": 1 }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "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": { + "constructor": true, + "scriptable": true, + "gc": true + }, + "desc": "创建rect对象。\n\n> 主要供脚本语言使用。", + "name": "rect_create", + "return": { + "type": "rect_t*", + "desc": "rect对象。" + } + }, + { + "params": [ + { + "type": "rect_t*", + "name": "rect", + "desc": "rect对象。" + }, + { + "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": "设置rect对象的xywh。\n\n> 主要供脚本语言使用。", + "name": "rect_set", + "return": { + "type": "rect_t*", + "desc": "rect对象。" + } + }, + { + "params": [ + { + "type": "rect_t*", + "name": "rect", + "desc": "rect对象。" + } + ], + "annotation": { + "cast": true, + "scriptable": true + }, + "desc": "转换为rect对象。\n\n> 供脚本语言使用。", + "name": "rect_cast", + "return": { + "type": "rect_t*", + "desc": "rect对象。" + } + }, + { + "params": [ + { + "type": "rect_t*", + "name": "r", + "desc": "rect对象。" + } + ], + "annotation": { + "deconstructor": true, + "scriptable": true, + "gc": true + }, + "desc": "销毁rect对象。\n\n> 主要供脚本语言使用。", + "name": "rect_destroy", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "rect_t*", + "name": "r", + "desc": "rect对象。" + }, + { + "type": "float_t", + "name": "scale", + "desc": "缩放比例。" + } + ], + "annotation": {}, + "desc": "缩放rect对象。", + "name": "rect_scale", + "return": { + "type": "rect_t*", + "desc": "返回rect对象。" + } + }, + { + "params": [ + { + "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": "初始化rect对象。", + "name": "rect_init", + "return": { + "type": "rect_t", + "desc": "返回rect对象。" + } + }, + { + "params": [ + { + "type": "rect_t*", + "name": "dst_r", + "desc": "rect对象。" + }, + { + "type": "const rect_t*", + "name": "r", + "desc": "rect对象。" + } + ], + "annotation": {}, + "desc": "合并两个rect对象。", + "name": "rect_merge", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "rect_t*", + "name": "r", + "desc": "rect对象。" + }, + { + "type": "xy_t", + "name": "x", + "desc": "x坐标。" + }, + { + "type": "xy_t", + "name": "y", + "desc": "y坐标。" + } + ], + "annotation": {}, + "desc": "判断指定的点在rect范围内。", + "name": "rect_contains", + "return": { + "type": "bool_t", + "desc": "返回在rect范围内。" + } + }, + { + "params": [ + { + "type": "rect_t*", + "name": "r", + "desc": "rect对象。" + } + ], + "annotation": {}, + "desc": "确保rect在指定的大小范围内。", + "name": "rect_fix", + "return": { + "type": "rect_t", + "desc": "返回修复之后的rect对象。" + } + }, + { + "params": [ + { + "type": "const rect_t*", + "name": "r1", + "desc": "rect对象。" + }, + { + "type": "const rect_t*", + "name": "r2", + "desc": "rect对象。" + } + ], + "annotation": {}, + "desc": "求两个rect的交集。", + "name": "rect_intersect", + "return": { + "type": "rect_t", + "desc": "返回交集。" + } + } + ], + "events": [], + "properties": [ + { + "name": "x", + "desc": "x坐标。", + "type": "xy_t", + "annotation": { + "readable": true, + "scriptable": true + } + }, + { + "name": "y", + "desc": "y坐标。", + "type": "xy_t", + "annotation": { + "readable": true, + "scriptable": true + } + }, + { + "name": "w", + "desc": "宽度。", + "type": "wh_t", + "annotation": { + "readable": true, + "scriptable": true + } + }, + { + "name": "h", + "desc": "高度。", + "type": "wh_t", + "annotation": { + "readable": true, + "scriptable": true + } + } + ], + "header": "tkc/rect.h", + "desc": "矩形。包括一个x坐标、y坐标、宽度和高度。", + "name": "rect_t", + "order": -10, + "annotation": { + "scriptable": true + }, + "level": 1 + }, + { + "type": "class", + "methods": [], + "events": [], + "properties": [ + { + "name": "x", + "desc": "x坐标。", + "type": "float_t", + "annotation": { + "readable": true + } + }, + { + "name": "y", + "desc": "y坐标。", + "type": "float_t", + "annotation": { + "readable": true + } + } + ], + "header": "tkc/rect.h", + "desc": "点(浮点数)。包括一个x坐标和一个y坐标。", + "name": "pointf_t", + "order": -10, + "annotation": { + "scriptable": true + }, + "level": 1 + }, + { + "type": "class", + "methods": [], + "events": [], + "properties": [ + { + "name": "x", + "desc": "x坐标。", + "type": "xy_t", + "annotation": { + "readable": true + } + }, + { + "name": "y", + "desc": "y坐标。", + "type": "xy_t", + "annotation": { + "readable": true + } + } + ], + "header": "tkc/rect.h", + "desc": "点。包括一个x坐标和一个y坐标。", + "name": "point_t", + "annotation": { + "scriptable": true + }, + "order": -10, + "level": 1 + }, { "type": "class", "methods": [ @@ -647,368 +1009,6 @@ }, "level": 1 }, - { - "type": "class", - "methods": [], - "events": [], - "properties": [ - { - "name": "x", - "desc": "x坐标。", - "type": "xy_t", - "annotation": { - "readable": true - } - }, - { - "name": "y", - "desc": "y坐标。", - "type": "xy_t", - "annotation": { - "readable": true - } - } - ], - "header": "tkc/rect.h", - "desc": "点。包括一个x坐标和一个y坐标。", - "name": "point_t", - "annotation": { - "scriptable": true - }, - "order": -10, - "level": 1 - }, - { - "type": "class", - "methods": [], - "events": [], - "properties": [ - { - "name": "x", - "desc": "x坐标。", - "type": "float_t", - "annotation": { - "readable": true - } - }, - { - "name": "y", - "desc": "y坐标。", - "type": "float_t", - "annotation": { - "readable": true - } - } - ], - "header": "tkc/rect.h", - "desc": "点(浮点数)。包括一个x坐标和一个y坐标。", - "name": "pointf_t", - "order": -10, - "annotation": { - "scriptable": true - }, - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "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": { - "constructor": true, - "scriptable": true, - "gc": true - }, - "desc": "创建rect对象。\n\n> 主要供脚本语言使用。", - "name": "rect_create", - "return": { - "type": "rect_t*", - "desc": "rect对象。" - } - }, - { - "params": [ - { - "type": "rect_t*", - "name": "rect", - "desc": "rect对象。" - }, - { - "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": "设置rect对象的xywh。\n\n> 主要供脚本语言使用。", - "name": "rect_set", - "return": { - "type": "rect_t*", - "desc": "rect对象。" - } - }, - { - "params": [ - { - "type": "rect_t*", - "name": "rect", - "desc": "rect对象。" - } - ], - "annotation": { - "cast": true, - "scriptable": true - }, - "desc": "转换为rect对象。\n\n> 供脚本语言使用。", - "name": "rect_cast", - "return": { - "type": "rect_t*", - "desc": "rect对象。" - } - }, - { - "params": [ - { - "type": "rect_t*", - "name": "r", - "desc": "rect对象。" - } - ], - "annotation": { - "deconstructor": true, - "scriptable": true, - "gc": true - }, - "desc": "销毁rect对象。\n\n> 主要供脚本语言使用。", - "name": "rect_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "rect_t*", - "name": "r", - "desc": "rect对象。" - }, - { - "type": "float_t", - "name": "scale", - "desc": "缩放比例。" - } - ], - "annotation": {}, - "desc": "缩放rect对象。", - "name": "rect_scale", - "return": { - "type": "rect_t*", - "desc": "返回rect对象。" - } - }, - { - "params": [ - { - "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": "初始化rect对象。", - "name": "rect_init", - "return": { - "type": "rect_t", - "desc": "返回rect对象。" - } - }, - { - "params": [ - { - "type": "rect_t*", - "name": "dst_r", - "desc": "rect对象。" - }, - { - "type": "const rect_t*", - "name": "r", - "desc": "rect对象。" - } - ], - "annotation": {}, - "desc": "合并两个rect对象。", - "name": "rect_merge", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "rect_t*", - "name": "r", - "desc": "rect对象。" - }, - { - "type": "xy_t", - "name": "x", - "desc": "x坐标。" - }, - { - "type": "xy_t", - "name": "y", - "desc": "y坐标。" - } - ], - "annotation": {}, - "desc": "判断指定的点在rect范围内。", - "name": "rect_contains", - "return": { - "type": "bool_t", - "desc": "返回在rect范围内。" - } - }, - { - "params": [ - { - "type": "rect_t*", - "name": "r", - "desc": "rect对象。" - } - ], - "annotation": {}, - "desc": "确保rect在指定的大小范围内。", - "name": "rect_fix", - "return": { - "type": "rect_t", - "desc": "返回修复之后的rect对象。" - } - }, - { - "params": [ - { - "type": "const rect_t*", - "name": "r1", - "desc": "rect对象。" - }, - { - "type": "const rect_t*", - "name": "r2", - "desc": "rect对象。" - } - ], - "annotation": {}, - "desc": "求两个rect的交集。", - "name": "rect_intersect", - "return": { - "type": "rect_t", - "desc": "返回交集。" - } - } - ], - "events": [], - "properties": [ - { - "name": "x", - "desc": "x坐标。", - "type": "xy_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "y", - "desc": "y坐标。", - "type": "xy_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "w", - "desc": "宽度。", - "type": "wh_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "h", - "desc": "高度。", - "type": "wh_t", - "annotation": { - "readable": true, - "scriptable": true - } - } - ], - "header": "tkc/rect.h", - "desc": "矩形。包括一个x坐标、y坐标、宽度和高度。", - "name": "rect_t", - "order": -10, - "annotation": { - "scriptable": true - }, - "level": 1 - }, { "type": "class", "methods": [ @@ -1454,6 +1454,1126 @@ }, "level": 1 }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "type": "value_t*", + "name": "v", + "desc": "value对象。" + }, + { + "type": "bool_t", + "name": "value", + "desc": "待设置的值。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "设置类型为bool的值。", + "name": "value_set_bool", + "return": { + "type": "value_t*", + "desc": "value对象本身。" + } + }, + { + "params": [ + { + "type": "value_t*", + "name": "v", + "desc": "value对象。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "获取类型为bool的值。", + "name": "value_bool", + "return": { + "type": "bool_t", + "desc": "值。" + } + }, + { + "params": [ + { + "type": "value_t*", + "name": "v", + "desc": "value对象。" + }, + { + "type": "int8_t", + "name": "value", + "desc": "待设置的值。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "设置类型为int8的值。", + "name": "value_set_int8", + "return": { + "type": "value_t*", + "desc": "value对象本身。" + } + }, + { + "params": [ + { + "type": "value_t*", + "name": "v", + "desc": "value对象。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "获取类型为int8的值。", + "name": "value_int8", + "return": { + "type": "int8_t", + "desc": "值。" + } + }, + { + "params": [ + { + "type": "value_t*", + "name": "v", + "desc": "value对象。" + }, + { + "type": "uint8_t", + "name": "value", + "desc": "待设置的值。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "设置类型为uint8的值。", + "name": "value_set_uint8", + "return": { + "type": "value_t*", + "desc": "value对象本身。" + } + }, + { + "params": [ + { + "type": "value_t*", + "name": "v", + "desc": "value对象。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "获取类型为uint8的值。", + "name": "value_uint8", + "return": { + "type": "int8_t", + "desc": "值。" + } + }, + { + "params": [ + { + "type": "value_t*", + "name": "v", + "desc": "value对象。" + }, + { + "type": "int16_t", + "name": "value", + "desc": "待设置的值。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "设置类型为int16的值。", + "name": "value_set_int16", + "return": { + "type": "value_t*", + "desc": "value对象本身。" + } + }, + { + "params": [ + { + "type": "value_t*", + "name": "v", + "desc": "value对象。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "获取类型为int16的值。", + "name": "value_int16", + "return": { + "type": "int16_t", + "desc": "值。" + } + }, + { + "params": [ + { + "type": "value_t*", + "name": "v", + "desc": "value对象。" + }, + { + "type": "uint16_t", + "name": "value", + "desc": "待设置的值。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "设置类型为uint16的值。", + "name": "value_set_uint16", + "return": { + "type": "value_t*", + "desc": "value对象本身。" + } + }, + { + "params": [ + { + "type": "value_t*", + "name": "v", + "desc": "value对象。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "获取类型为uint16的值。", + "name": "value_uint16", + "return": { + "type": "uint16_t", + "desc": "值。" + } + }, + { + "params": [ + { + "type": "value_t*", + "name": "v", + "desc": "value对象。" + }, + { + "type": "int32_t", + "name": "value", + "desc": "待设置的值。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "设置类型为int32的值。", + "name": "value_set_int32", + "return": { + "type": "value_t*", + "desc": "value对象本身。" + } + }, + { + "params": [ + { + "type": "value_t*", + "name": "v", + "desc": "value对象。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "获取类型为int32的值。", + "name": "value_int32", + "return": { + "type": "int32_t", + "desc": "值。" + } + }, + { + "params": [ + { + "type": "value_t*", + "name": "v", + "desc": "value对象。" + }, + { + "type": "uint32_t", + "name": "value", + "desc": "待设置的值。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "设置类型为uint32的值。", + "name": "value_set_uint32", + "return": { + "type": "value_t*", + "desc": "value对象本身。" + } + }, + { + "params": [ + { + "type": "value_t*", + "name": "v", + "desc": "value对象。" + } + ], + "annotation": {}, + "desc": "获取类型为uint32的值。", + "name": "value_uint32", + "return": { + "type": "uint32_t", + "desc": "值。" + } + }, + { + "params": [ + { + "type": "value_t*", + "name": "v", + "desc": "value对象。" + }, + { + "type": "int64_t", + "name": "value", + "desc": "待设置的值。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "设置类型为int64的值。", + "name": "value_set_int64", + "return": { + "type": "value_t*", + "desc": "value对象本身。" + } + }, + { + "params": [ + { + "type": "value_t*", + "name": "v", + "desc": "value对象。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "获取类型为int64的值。", + "name": "value_int64", + "return": { + "type": "int64_t", + "desc": "值。" + } + }, + { + "params": [ + { + "type": "value_t*", + "name": "v", + "desc": "value对象。" + }, + { + "type": "uint64_t", + "name": "value", + "desc": "待设置的值。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "设置类型为uint64的值。", + "name": "value_set_uint64", + "return": { + "type": "value_t*", + "desc": "value对象本身。" + } + }, + { + "params": [ + { + "type": "value_t*", + "name": "v", + "desc": "value对象。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "获取类型为uint64的值。", + "name": "value_uint64", + "return": { + "type": "uint64_t", + "desc": "值。" + } + }, + { + "params": [ + { + "type": "value_t*", + "name": "v", + "desc": "value对象。" + }, + { + "type": "void*", + "name": "value", + "desc": "待设置的值。" + } + ], + "annotation": {}, + "desc": "设置类型为pointer的值。", + "name": "value_set_pointer", + "return": { + "type": "value_t*", + "desc": "value对象本身。" + } + }, + { + "params": [ + { + "type": "value_t*", + "name": "v", + "desc": "value对象。" + } + ], + "annotation": {}, + "desc": "获取类型为pointer的值。", + "name": "value_pointer", + "return": { + "type": "void*", + "desc": "值。" + } + }, + { + "params": [ + { + "type": "value_t*", + "name": "v", + "desc": "value对象。" + }, + { + "type": "float_t", + "name": "value", + "desc": "待设置的值。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "设置类型为float\\_t的值。", + "name": "value_set_float", + "return": { + "type": "value_t*", + "desc": "value对象本身。" + } + }, + { + "params": [ + { + "type": "value_t*", + "name": "v", + "desc": "value对象。" + } + ], + "annotation": {}, + "desc": "获取类型为float\\_t的值。", + "name": "value_float", + "return": { + "type": "float_t", + "desc": "值。" + } + }, + { + "params": [ + { + "type": "value_t*", + "name": "v", + "desc": "value对象。" + }, + { + "type": "float", + "name": "value", + "desc": "待设置的值。" + } + ], + "annotation": {}, + "desc": "设置类型为float的值。", + "name": "value_set_float32", + "return": { + "type": "value_t*", + "desc": "value对象本身。" + } + }, + { + "params": [ + { + "type": "value_t*", + "name": "v", + "desc": "value对象。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "获取类型为float的值。", + "name": "value_float32", + "return": { + "type": "float", + "desc": "值。" + } + }, + { + "params": [ + { + "type": "value_t*", + "name": "v", + "desc": "value对象。" + }, + { + "type": "double", + "name": "value", + "desc": "待设置的值。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "设置类型为double的值。", + "name": "value_set_double", + "alias": "value_set_float64", + "return": { + "type": "value_t*", + "desc": "value对象本身。" + } + }, + { + "params": [ + { + "type": "value_t*", + "name": "v", + "desc": "value对象。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "获取类型为double的值。", + "name": "value_double", + "alias": "value_float64", + "return": { + "type": "double", + "desc": "值。" + } + }, + { + "params": [ + { + "type": "value_t*", + "name": "v", + "desc": "value对象。" + }, + { + "type": "const char*", + "name": "value", + "desc": "待设置的值。" + } + ], + "annotation": {}, + "desc": "设置类型为字符串的值。", + "name": "value_set_str", + "return": { + "type": "value_t*", + "desc": "value对象本身。" + } + }, + { + "params": [ + { + "type": "value_t*", + "name": "v", + "desc": "value对象。" + }, + { + "type": "const char*", + "name": "value", + "desc": "待设置的值。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "设置类型为字符串的值(并拷贝字符串)。", + "name": "value_dup_str", + "alias": "value_set_str", + "return": { + "type": "value_t*", + "desc": "value对象本身。" + } + }, + { + "params": [ + { + "type": "value_t*", + "name": "v", + "desc": "value对象。" + }, + { + "type": "const char*", + "name": "value", + "desc": "待设置的值。" + }, + { + "type": "uint32_t", + "name": "len", + "desc": "长度。" + } + ], + "annotation": {}, + "desc": "设置类型为字符串的值(并拷贝字符串)。", + "name": "value_dup_str_with_len", + "return": { + "type": "value_t*", + "desc": "value对象本身。" + } + }, + { + "params": [ + { + "type": "value_t*", + "name": "v", + "desc": "value对象。" + }, + { + "type": "const wchar_t*", + "name": "value", + "desc": "待设置的值。" + } + ], + "annotation": {}, + "desc": "设置类型为宽字符串的值。", + "name": "value_set_wstr", + "return": { + "type": "value_t*", + "desc": "value对象本身。" + } + }, + { + "params": [ + { + "type": "value_t*", + "name": "v", + "desc": "value对象。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "获取类型为字符串的值。", + "name": "value_str", + "return": { + "type": "const char*", + "desc": "值。" + } + }, + { + "params": [ + { + "type": "value_t*", + "name": "v", + "desc": "value对象。" + }, + { + "type": "char*", + "name": "buff", + "desc": "用于格式转换的缓冲区。" + }, + { + "type": "uint32_t", + "name": "size", + "desc": "缓冲区大小。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "获取类型为字符串的值。", + "name": "value_str_ex", + "return": { + "type": "const char*", + "desc": "值。" + } + }, + { + "params": [ + { + "type": "value_t*", + "name": "v", + "desc": "value对象。" + } + ], + "annotation": {}, + "desc": "获取类型为宽字符串的值。", + "name": "value_wstr", + "return": { + "type": "const wchar_t*", + "desc": "值。" + } + }, + { + "params": [ + { + "type": "value_t*", + "name": "value", + "desc": "value对象。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "判断value是否为空值。", + "name": "value_is_null", + "return": { + "type": "bool_t", + "desc": "为空值返回TRUE,否则返回FALSE。" + } + }, + { + "params": [ + { + "type": "value_t*", + "name": "value", + "desc": "value对象。" + }, + { + "type": "value_t*", + "name": "other", + "desc": "value对象。" + } + ], + "annotation": {}, + "desc": "判断两个value是否相同。", + "name": "value_equal", + "return": { + "type": "bool_t", + "desc": "为空值返回TRUE,否则返回FALSE。" + } + }, + { + "params": [ + { + "type": "value_t*", + "name": "v", + "desc": "value对象。" + } + ], + "annotation": {}, + "desc": "转换为int的值。", + "name": "value_int", + "return": { + "type": "int", + "desc": "值。" + } + }, + { + "params": [ + { + "type": "value_t*", + "name": "v", + "desc": "value对象。" + }, + { + "type": "int32_t", + "name": "value", + "desc": "待设置的值。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "设置类型为int的值。", + "name": "value_set_int", + "return": { + "type": "value_t*", + "desc": "value对象本身。" + } + }, + { + "params": [ + { + "type": "value_t*", + "name": "v", + "desc": "value对象。" + }, + { + "type": "object_t*", + "name": "value", + "desc": "待设置的值。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "设置类型为object的值。", + "name": "value_set_object", + "return": { + "type": "value_t*", + "desc": "value对象本身。" + } + }, + { + "params": [ + { + "type": "value_t*", + "name": "v", + "desc": "value对象。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "转换为object的值。", + "name": "value_object", + "return": { + "type": "object_t*", + "desc": "值。" + } + }, + { + "params": [ + { + "type": "value_t*", + "name": "v", + "desc": "value对象。" + }, + { + "type": "uint32_t", + "name": "value", + "desc": "待设置的值。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "设置类型为token的值。", + "name": "value_set_token", + "return": { + "type": "value_t*", + "desc": "value对象本身。" + } + }, + { + "params": [ + { + "type": "value_t*", + "name": "v", + "desc": "value对象。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "获取token的值。", + "name": "value_token", + "return": { + "type": "uint32_t", + "desc": "值。" + } + }, + { + "params": [ + { + "type": "value_t*", + "name": "v", + "desc": "value对象。" + }, + { + "type": "char*", + "name": "str", + "desc": "待设置的值。" + }, + { + "type": "uint32_t", + "name": "size", + "desc": "长度。" + } + ], + "annotation": {}, + "desc": "设置类型为带长度的字符串的值。", + "name": "value_set_sized_str", + "return": { + "type": "value_t*", + "desc": "value对象本身。" + } + }, + { + "params": [ + { + "type": "value_t*", + "name": "v", + "desc": "value对象。" + } + ], + "annotation": {}, + "desc": "获取为sized_str的值。", + "name": "value_sized_str", + "return": { + "type": "sized_str_t*", + "desc": "值。" + } + }, + { + "params": [ + { + "type": "value_t*", + "name": "v", + "desc": "value对象。" + }, + { + "type": "void*", + "name": "value", + "desc": "待设置的值。" + }, + { + "type": "uint32_t", + "name": "size", + "desc": "长度。" + } + ], + "annotation": {}, + "desc": "设置类型为binary_data的值。", + "name": "value_set_binary_data", + "return": { + "type": "value_t*", + "desc": "value对象本身。" + } + }, + { + "params": [ + { + "type": "value_t*", + "name": "v", + "desc": "value对象。" + }, + { + "type": "const void*", + "name": "value", + "desc": "待设置的值。" + }, + { + "type": "uint32_t", + "name": "size", + "desc": "长度。" + } + ], + "annotation": {}, + "desc": "设置类型为binary_data的值(复制数据)。", + "name": "value_dup_binary_data", + "return": { + "type": "value_t*", + "desc": "value对象本身。" + } + }, + { + "params": [ + { + "type": "value_t*", + "name": "v", + "desc": "value对象。" + } + ], + "annotation": {}, + "desc": "获取为binary_data的值。", + "name": "value_binary_data", + "return": { + "type": "binary_data_t*", + "desc": "值。" + } + }, + { + "params": [ + { + "type": "value_t*", + "name": "v", + "desc": "value对象。" + }, + { + "type": "void*", + "name": "value", + "desc": "待设置的值。" + }, + { + "type": "uint32_t", + "name": "size", + "desc": "长度。" + } + ], + "annotation": {}, + "desc": "设置类型为ubjson的值。", + "name": "value_set_ubjson", + "return": { + "type": "value_t*", + "desc": "value对象本身。" + } + }, + { + "params": [ + { + "type": "value_t*", + "name": "v", + "desc": "value对象。" + } + ], + "annotation": {}, + "desc": "获取为ubjson的值。", + "name": "value_ubjson", + "return": { + "type": "binary_data_t*", + "desc": "值。" + } + }, + { + "params": [ + { + "type": "value_t*", + "name": "dst", + "desc": "目的value对象。" + }, + { + "type": "value_t*", + "name": "src", + "desc": "源value对象。" + } + ], + "annotation": {}, + "desc": "拷贝value的值。", + "name": "value_copy", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "value_t*", + "name": "dst", + "desc": "目的value对象。" + }, + { + "type": "value_t*", + "name": "src", + "desc": "源value对象。" + } + ], + "annotation": {}, + "desc": "深拷贝value的值。", + "name": "value_deep_copy", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [], + "annotation": { + "constructor": true, + "scriptable": true, + "gc": true + }, + "desc": "创建value对象。", + "name": "value_create", + "return": { + "type": "value_t*", + "desc": "对象。" + } + }, + { + "params": [ + { + "type": "value_t*", + "name": "v", + "desc": "value对象。" + } + ], + "annotation": { + "deconstructor": true, + "scriptable": true, + "gc": true + }, + "desc": "销毁value对象。", + "name": "value_destroy", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "value_t*", + "name": "v", + "desc": "value对象。" + } + ], + "annotation": { + "deconstructor": true, + "scriptable": true + }, + "desc": "重置value对象。", + "name": "value_reset", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "value_t*", + "name": "value", + "desc": "value对象。" + } + ], + "annotation": { + "cast": true, + "scriptable": true + }, + "desc": "转换为value对象。\n\n> 供脚本语言使用", + "name": "value_cast", + "return": { + "type": "value_t*", + "desc": "对象。" + } + } + ], + "events": [], + "properties": [], + "header": "tkc/value.h", + "desc": "一个通用数据类型,用来存放整数、浮点数、字符串和其它对象。\n\n在C/C++中,一般不需动态创建对象,直接声明并初始化即可。如:\n\n```c\nvalue_t v;\nvalue_set_int(&v, 100);\n```\n\n> 在脚本语言中,需要动态创建对象。", + "name": "value_t", + "order": -9, + "annotation": { + "scriptable": true + }, + "level": 1 + }, { "type": "class", "methods": [ @@ -2712,1126 +3832,6 @@ }, "level": 2 }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "value_t*", - "name": "v", - "desc": "value对象。" - }, - { - "type": "bool_t", - "name": "value", - "desc": "待设置的值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置类型为bool的值。", - "name": "value_set_bool", - "return": { - "type": "value_t*", - "desc": "value对象本身。" - } - }, - { - "params": [ - { - "type": "value_t*", - "name": "v", - "desc": "value对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取类型为bool的值。", - "name": "value_bool", - "return": { - "type": "bool_t", - "desc": "值。" - } - }, - { - "params": [ - { - "type": "value_t*", - "name": "v", - "desc": "value对象。" - }, - { - "type": "int8_t", - "name": "value", - "desc": "待设置的值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置类型为int8的值。", - "name": "value_set_int8", - "return": { - "type": "value_t*", - "desc": "value对象本身。" - } - }, - { - "params": [ - { - "type": "value_t*", - "name": "v", - "desc": "value对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取类型为int8的值。", - "name": "value_int8", - "return": { - "type": "int8_t", - "desc": "值。" - } - }, - { - "params": [ - { - "type": "value_t*", - "name": "v", - "desc": "value对象。" - }, - { - "type": "uint8_t", - "name": "value", - "desc": "待设置的值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置类型为uint8的值。", - "name": "value_set_uint8", - "return": { - "type": "value_t*", - "desc": "value对象本身。" - } - }, - { - "params": [ - { - "type": "value_t*", - "name": "v", - "desc": "value对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取类型为uint8的值。", - "name": "value_uint8", - "return": { - "type": "int8_t", - "desc": "值。" - } - }, - { - "params": [ - { - "type": "value_t*", - "name": "v", - "desc": "value对象。" - }, - { - "type": "int16_t", - "name": "value", - "desc": "待设置的值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置类型为int16的值。", - "name": "value_set_int16", - "return": { - "type": "value_t*", - "desc": "value对象本身。" - } - }, - { - "params": [ - { - "type": "value_t*", - "name": "v", - "desc": "value对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取类型为int16的值。", - "name": "value_int16", - "return": { - "type": "int16_t", - "desc": "值。" - } - }, - { - "params": [ - { - "type": "value_t*", - "name": "v", - "desc": "value对象。" - }, - { - "type": "uint16_t", - "name": "value", - "desc": "待设置的值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置类型为uint16的值。", - "name": "value_set_uint16", - "return": { - "type": "value_t*", - "desc": "value对象本身。" - } - }, - { - "params": [ - { - "type": "value_t*", - "name": "v", - "desc": "value对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取类型为uint16的值。", - "name": "value_uint16", - "return": { - "type": "uint16_t", - "desc": "值。" - } - }, - { - "params": [ - { - "type": "value_t*", - "name": "v", - "desc": "value对象。" - }, - { - "type": "int32_t", - "name": "value", - "desc": "待设置的值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置类型为int32的值。", - "name": "value_set_int32", - "return": { - "type": "value_t*", - "desc": "value对象本身。" - } - }, - { - "params": [ - { - "type": "value_t*", - "name": "v", - "desc": "value对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取类型为int32的值。", - "name": "value_int32", - "return": { - "type": "int32_t", - "desc": "值。" - } - }, - { - "params": [ - { - "type": "value_t*", - "name": "v", - "desc": "value对象。" - }, - { - "type": "uint32_t", - "name": "value", - "desc": "待设置的值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置类型为uint32的值。", - "name": "value_set_uint32", - "return": { - "type": "value_t*", - "desc": "value对象本身。" - } - }, - { - "params": [ - { - "type": "value_t*", - "name": "v", - "desc": "value对象。" - } - ], - "annotation": {}, - "desc": "获取类型为uint32的值。", - "name": "value_uint32", - "return": { - "type": "uint32_t", - "desc": "值。" - } - }, - { - "params": [ - { - "type": "value_t*", - "name": "v", - "desc": "value对象。" - }, - { - "type": "int64_t", - "name": "value", - "desc": "待设置的值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置类型为int64的值。", - "name": "value_set_int64", - "return": { - "type": "value_t*", - "desc": "value对象本身。" - } - }, - { - "params": [ - { - "type": "value_t*", - "name": "v", - "desc": "value对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取类型为int64的值。", - "name": "value_int64", - "return": { - "type": "int64_t", - "desc": "值。" - } - }, - { - "params": [ - { - "type": "value_t*", - "name": "v", - "desc": "value对象。" - }, - { - "type": "uint64_t", - "name": "value", - "desc": "待设置的值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置类型为uint64的值。", - "name": "value_set_uint64", - "return": { - "type": "value_t*", - "desc": "value对象本身。" - } - }, - { - "params": [ - { - "type": "value_t*", - "name": "v", - "desc": "value对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取类型为uint64的值。", - "name": "value_uint64", - "return": { - "type": "uint64_t", - "desc": "值。" - } - }, - { - "params": [ - { - "type": "value_t*", - "name": "v", - "desc": "value对象。" - }, - { - "type": "void*", - "name": "value", - "desc": "待设置的值。" - } - ], - "annotation": {}, - "desc": "设置类型为pointer的值。", - "name": "value_set_pointer", - "return": { - "type": "value_t*", - "desc": "value对象本身。" - } - }, - { - "params": [ - { - "type": "value_t*", - "name": "v", - "desc": "value对象。" - } - ], - "annotation": {}, - "desc": "获取类型为pointer的值。", - "name": "value_pointer", - "return": { - "type": "void*", - "desc": "值。" - } - }, - { - "params": [ - { - "type": "value_t*", - "name": "v", - "desc": "value对象。" - }, - { - "type": "float_t", - "name": "value", - "desc": "待设置的值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置类型为float\\_t的值。", - "name": "value_set_float", - "return": { - "type": "value_t*", - "desc": "value对象本身。" - } - }, - { - "params": [ - { - "type": "value_t*", - "name": "v", - "desc": "value对象。" - } - ], - "annotation": {}, - "desc": "获取类型为float\\_t的值。", - "name": "value_float", - "return": { - "type": "float_t", - "desc": "值。" - } - }, - { - "params": [ - { - "type": "value_t*", - "name": "v", - "desc": "value对象。" - }, - { - "type": "float", - "name": "value", - "desc": "待设置的值。" - } - ], - "annotation": {}, - "desc": "设置类型为float的值。", - "name": "value_set_float32", - "return": { - "type": "value_t*", - "desc": "value对象本身。" - } - }, - { - "params": [ - { - "type": "value_t*", - "name": "v", - "desc": "value对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取类型为float的值。", - "name": "value_float32", - "return": { - "type": "float", - "desc": "值。" - } - }, - { - "params": [ - { - "type": "value_t*", - "name": "v", - "desc": "value对象。" - }, - { - "type": "double", - "name": "value", - "desc": "待设置的值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置类型为double的值。", - "name": "value_set_double", - "alias": "value_set_float64", - "return": { - "type": "value_t*", - "desc": "value对象本身。" - } - }, - { - "params": [ - { - "type": "value_t*", - "name": "v", - "desc": "value对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取类型为double的值。", - "name": "value_double", - "alias": "value_float64", - "return": { - "type": "double", - "desc": "值。" - } - }, - { - "params": [ - { - "type": "value_t*", - "name": "v", - "desc": "value对象。" - }, - { - "type": "const char*", - "name": "value", - "desc": "待设置的值。" - } - ], - "annotation": {}, - "desc": "设置类型为字符串的值。", - "name": "value_set_str", - "return": { - "type": "value_t*", - "desc": "value对象本身。" - } - }, - { - "params": [ - { - "type": "value_t*", - "name": "v", - "desc": "value对象。" - }, - { - "type": "const char*", - "name": "value", - "desc": "待设置的值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置类型为字符串的值(并拷贝字符串)。", - "name": "value_dup_str", - "alias": "value_set_str", - "return": { - "type": "value_t*", - "desc": "value对象本身。" - } - }, - { - "params": [ - { - "type": "value_t*", - "name": "v", - "desc": "value对象。" - }, - { - "type": "const char*", - "name": "value", - "desc": "待设置的值。" - }, - { - "type": "uint32_t", - "name": "len", - "desc": "长度。" - } - ], - "annotation": {}, - "desc": "设置类型为字符串的值(并拷贝字符串)。", - "name": "value_dup_str_with_len", - "return": { - "type": "value_t*", - "desc": "value对象本身。" - } - }, - { - "params": [ - { - "type": "value_t*", - "name": "v", - "desc": "value对象。" - }, - { - "type": "const wchar_t*", - "name": "value", - "desc": "待设置的值。" - } - ], - "annotation": {}, - "desc": "设置类型为宽字符串的值。", - "name": "value_set_wstr", - "return": { - "type": "value_t*", - "desc": "value对象本身。" - } - }, - { - "params": [ - { - "type": "value_t*", - "name": "v", - "desc": "value对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取类型为字符串的值。", - "name": "value_str", - "return": { - "type": "const char*", - "desc": "值。" - } - }, - { - "params": [ - { - "type": "value_t*", - "name": "v", - "desc": "value对象。" - }, - { - "type": "char*", - "name": "buff", - "desc": "用于格式转换的缓冲区。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "缓冲区大小。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取类型为字符串的值。", - "name": "value_str_ex", - "return": { - "type": "const char*", - "desc": "值。" - } - }, - { - "params": [ - { - "type": "value_t*", - "name": "v", - "desc": "value对象。" - } - ], - "annotation": {}, - "desc": "获取类型为宽字符串的值。", - "name": "value_wstr", - "return": { - "type": "const wchar_t*", - "desc": "值。" - } - }, - { - "params": [ - { - "type": "value_t*", - "name": "value", - "desc": "value对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "判断value是否为空值。", - "name": "value_is_null", - "return": { - "type": "bool_t", - "desc": "为空值返回TRUE,否则返回FALSE。" - } - }, - { - "params": [ - { - "type": "value_t*", - "name": "value", - "desc": "value对象。" - }, - { - "type": "value_t*", - "name": "other", - "desc": "value对象。" - } - ], - "annotation": {}, - "desc": "判断两个value是否相同。", - "name": "value_equal", - "return": { - "type": "bool_t", - "desc": "为空值返回TRUE,否则返回FALSE。" - } - }, - { - "params": [ - { - "type": "value_t*", - "name": "v", - "desc": "value对象。" - } - ], - "annotation": {}, - "desc": "转换为int的值。", - "name": "value_int", - "return": { - "type": "int", - "desc": "值。" - } - }, - { - "params": [ - { - "type": "value_t*", - "name": "v", - "desc": "value对象。" - }, - { - "type": "int32_t", - "name": "value", - "desc": "待设置的值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置类型为int的值。", - "name": "value_set_int", - "return": { - "type": "value_t*", - "desc": "value对象本身。" - } - }, - { - "params": [ - { - "type": "value_t*", - "name": "v", - "desc": "value对象。" - }, - { - "type": "object_t*", - "name": "value", - "desc": "待设置的值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置类型为object的值。", - "name": "value_set_object", - "return": { - "type": "value_t*", - "desc": "value对象本身。" - } - }, - { - "params": [ - { - "type": "value_t*", - "name": "v", - "desc": "value对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "转换为object的值。", - "name": "value_object", - "return": { - "type": "object_t*", - "desc": "值。" - } - }, - { - "params": [ - { - "type": "value_t*", - "name": "v", - "desc": "value对象。" - }, - { - "type": "uint32_t", - "name": "value", - "desc": "待设置的值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置类型为token的值。", - "name": "value_set_token", - "return": { - "type": "value_t*", - "desc": "value对象本身。" - } - }, - { - "params": [ - { - "type": "value_t*", - "name": "v", - "desc": "value对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取token的值。", - "name": "value_token", - "return": { - "type": "uint32_t", - "desc": "值。" - } - }, - { - "params": [ - { - "type": "value_t*", - "name": "v", - "desc": "value对象。" - }, - { - "type": "char*", - "name": "str", - "desc": "待设置的值。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "长度。" - } - ], - "annotation": {}, - "desc": "设置类型为带长度的字符串的值。", - "name": "value_set_sized_str", - "return": { - "type": "value_t*", - "desc": "value对象本身。" - } - }, - { - "params": [ - { - "type": "value_t*", - "name": "v", - "desc": "value对象。" - } - ], - "annotation": {}, - "desc": "获取为sized_str的值。", - "name": "value_sized_str", - "return": { - "type": "sized_str_t*", - "desc": "值。" - } - }, - { - "params": [ - { - "type": "value_t*", - "name": "v", - "desc": "value对象。" - }, - { - "type": "void*", - "name": "value", - "desc": "待设置的值。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "长度。" - } - ], - "annotation": {}, - "desc": "设置类型为binary_data的值。", - "name": "value_set_binary_data", - "return": { - "type": "value_t*", - "desc": "value对象本身。" - } - }, - { - "params": [ - { - "type": "value_t*", - "name": "v", - "desc": "value对象。" - }, - { - "type": "const void*", - "name": "value", - "desc": "待设置的值。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "长度。" - } - ], - "annotation": {}, - "desc": "设置类型为binary_data的值(复制数据)。", - "name": "value_dup_binary_data", - "return": { - "type": "value_t*", - "desc": "value对象本身。" - } - }, - { - "params": [ - { - "type": "value_t*", - "name": "v", - "desc": "value对象。" - } - ], - "annotation": {}, - "desc": "获取为binary_data的值。", - "name": "value_binary_data", - "return": { - "type": "binary_data_t*", - "desc": "值。" - } - }, - { - "params": [ - { - "type": "value_t*", - "name": "v", - "desc": "value对象。" - }, - { - "type": "void*", - "name": "value", - "desc": "待设置的值。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "长度。" - } - ], - "annotation": {}, - "desc": "设置类型为ubjson的值。", - "name": "value_set_ubjson", - "return": { - "type": "value_t*", - "desc": "value对象本身。" - } - }, - { - "params": [ - { - "type": "value_t*", - "name": "v", - "desc": "value对象。" - } - ], - "annotation": {}, - "desc": "获取为ubjson的值。", - "name": "value_ubjson", - "return": { - "type": "binary_data_t*", - "desc": "值。" - } - }, - { - "params": [ - { - "type": "value_t*", - "name": "dst", - "desc": "目的value对象。" - }, - { - "type": "value_t*", - "name": "src", - "desc": "源value对象。" - } - ], - "annotation": {}, - "desc": "拷贝value的值。", - "name": "value_copy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "value_t*", - "name": "dst", - "desc": "目的value对象。" - }, - { - "type": "value_t*", - "name": "src", - "desc": "源value对象。" - } - ], - "annotation": {}, - "desc": "深拷贝value的值。", - "name": "value_deep_copy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [], - "annotation": { - "constructor": true, - "scriptable": true, - "gc": true - }, - "desc": "创建value对象。", - "name": "value_create", - "return": { - "type": "value_t*", - "desc": "对象。" - } - }, - { - "params": [ - { - "type": "value_t*", - "name": "v", - "desc": "value对象。" - } - ], - "annotation": { - "deconstructor": true, - "scriptable": true, - "gc": true - }, - "desc": "销毁value对象。", - "name": "value_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "value_t*", - "name": "v", - "desc": "value对象。" - } - ], - "annotation": { - "deconstructor": true, - "scriptable": true - }, - "desc": "重置value对象。", - "name": "value_reset", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "value_t*", - "name": "value", - "desc": "value对象。" - } - ], - "annotation": { - "cast": true, - "scriptable": true - }, - "desc": "转换为value对象。\n\n> 供脚本语言使用", - "name": "value_cast", - "return": { - "type": "value_t*", - "desc": "对象。" - } - } - ], - "events": [], - "properties": [], - "header": "tkc/value.h", - "desc": "一个通用数据类型,用来存放整数、浮点数、字符串和其它对象。\n\n在C/C++中,一般不需动态创建对象,直接声明并初始化即可。如:\n\n```c\nvalue_t v;\nvalue_set_int(&v, 100);\n```\n\n> 在脚本语言中,需要动态创建对象。", - "name": "value_t", - "order": -9, - "annotation": { - "scriptable": true - }, - "level": 1 - }, { "type": "class", "methods": [ @@ -4096,2247 +4096,6 @@ }, "level": 1 }, - { - "type": "class", - "methods": [ - { - "params": [], - "annotation": {}, - "desc": "创建缺省的资源加载器。", - "name": "asset_loader_create", - "return": { - "type": "asset_loader_t*", - "desc": "返回loader对象。" - } - }, - { - "params": [ - { - "type": "asset_loader_t*", - "name": "loader", - "desc": "loader对象。" - }, - { - "type": "uint16_t", - "name": "type", - "desc": "资源类型。" - }, - { - "type": "uint16_t", - "name": "subtype", - "desc": "资源子类型。" - }, - { - "type": "const char*", - "name": "path", - "desc": "路径。" - }, - { - "type": "const char*", - "name": "name", - "desc": "名称。" - } - ], - "annotation": {}, - "desc": "加载指定的资源。", - "name": "asset_loader_load", - "return": { - "type": "asset_info_t*", - "desc": "返回资源对象(由调用者销毁)。" - } - }, - { - "params": [ - { - "type": "asset_loader_t*", - "name": "loader", - "desc": "loader对象。" - }, - { - "type": "const char*", - "name": "path", - "desc": "资源是路径。" - } - ], - "annotation": {}, - "desc": "判断指定资源是否存在。\n。", - "name": "asset_loader_exist", - "return": { - "type": "bool_t", - "desc": "返回TRUE表示存在,否则不存在。" - } - }, - { - "params": [ - { - "type": "asset_loader_t*", - "name": "loader", - "desc": "loader对象。" - } - ], - "annotation": {}, - "desc": "销毁loader对象。", - "name": "asset_loader_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [], - "header": "base/asset_loader.h", - "desc": "资源加载器接口。", - "name": "asset_loader_t", - "level": 1 - }, - { - "type": "enum", - "desc": "bidi 类型常量定义。", - "consts": [ - { - "desc": "自动检查。", - "name": "BIDI_TYPE_AUTO" - }, - { - "desc": "Left-To-Right letter。", - "name": "BIDI_TYPE_LTR" - }, - { - "desc": "Right-To-Left letter。", - "name": "BIDI_TYPE_RTL" - }, - { - "desc": "Left-To-Right letter Override。", - "name": "BIDI_TYPE_LRO" - }, - { - "desc": "Right-To-Left letter Override。", - "name": "BIDI_TYPE_RLO" - }, - { - "desc": "Weak Left To Right paragraph。", - "name": "BIDI_TYPE_WLTR" - }, - { - "desc": "Weak Right To Left paragraph。", - "name": "BIDI_TYPE_WRTL" - } - ], - "header": "base/bidi.h", - "name": "bidi_type_t", - "prefix": "BIDI_TYPE_", - "annotation": { - "scriptable": true - }, - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "bidi_t*", - "name": "bidi", - "desc": "bidi对象。" - }, - { - "type": "bool_t", - "name": "alloc_l2v", - "desc": "是否为positions_L_to_V分配空间。" - }, - { - "type": "bool_t", - "name": "alloc_v2l", - "desc": "是否为positions_V_to_L分配空间。" - }, - { - "type": "bidi_type_t", - "name": "type", - "desc": "类型。" - } - ], - "annotation": { - "deconstructor": true - }, - "desc": "初始化bidi对象。", - "name": "bidi_init", - "return": { - "type": "bidi_t*", - "desc": "返回bidi对象。" - } - }, - { - "params": [ - { - "type": "const char*", - "name": "name", - "desc": "类型名称(取值:rtl,ltr,auto,wrtl,wltr,lro,rlo)。" - } - ], - "annotation": { - "static": true - }, - "desc": "将bidi类型的名称转换成类型。", - "name": "bidi_type_from_name", - "return": { - "type": "bidi_t*", - "desc": "返回bidi对象。" - } - }, - { - "params": [ - { - "type": "bidi_t*", - "name": "bidi", - "desc": "bidi对象。" - }, - { - "type": "const wchar_t*", - "name": "str", - "desc": "字符串。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "字符串的长度。" - } - ], - "annotation": {}, - "desc": "将字符串转成用于显示的字符串,输出结果放在bidi->vis_str中。", - "name": "bidi_log2vis", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "bidi_t*", - "name": "bidi", - "desc": "bidi对象。" - } - ], - "annotation": { - "deconstructor": true - }, - "desc": "释放bidi对象相关资源。", - "name": "bidi_deinit", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [ - { - "name": "vis_strx", - "desc": "用于显示的字符串(存放log2vis的结果)。", - "type": "wchar_t*", - "annotation": { - "readable": true - } - }, - { - "name": "vis_str_size", - "desc": "用于显示的字符串长度(存放log2vis的结果)。", - "type": "uint32_t", - "annotation": { - "readable": true - } - }, - { - "name": "request_type", - "desc": "请求的类型。", - "type": "bidi_type_t", - "annotation": { - "readable": true - } - }, - { - "name": "resolved_type", - "desc": "实际的类型。", - "type": "bidi_type_t", - "annotation": { - "readable": true - } - }, - { - "name": "positions_L_to_V", - "desc": "logical位置与visual位置的映射。", - "type": "int32_t*", - "annotation": { - "readable": true - } - }, - { - "name": "positions_V_to_L", - "desc": "visual位置与logical位置的映射。", - "type": "int32_t*", - "annotation": { - "readable": true - } - } - ], - "header": "base/bidi.h", - "desc": "Unicode Bidirectional Algorithm.", - "name": "bidi_t", - "level": 1 - }, - { - "type": "enum", - "desc": "图片绘制方法常量定义。", - "consts": [ - { - "desc": "缺省显示。将图片按原大小显示在目标矩形的左上角。", - "name": "IMAGE_DRAW_DEFAULT" - }, - { - "desc": "居中显示。将图片按原大小显示在目标矩形的中央。", - "name": "IMAGE_DRAW_CENTER" - }, - { - "desc": "图标显示。同居中显示,但会根据屏幕密度调整大小。", - "name": "IMAGE_DRAW_ICON" - }, - { - "desc": "缩放显示。将图片缩放至目标矩形的大小(不保证宽高成比例)。", - "name": "IMAGE_DRAW_SCALE" - }, - { - "desc": "自动缩放显示。将图片缩放至目标矩形的宽度或高度(选取最小的比例),并居中显示。", - "name": "IMAGE_DRAW_SCALE_AUTO" - }, - { - "desc": "如果图片比目标矩形大,自动缩小显示,否则居中显示。", - "name": "IMAGE_DRAW_SCALE_DOWN" - }, - { - "desc": "宽度缩放显示。 将图片缩放至目标矩形的宽度,高度按此比例进行缩放,超出不部分不显示。", - "name": "IMAGE_DRAW_SCALE_W" - }, - { - "desc": "高度缩放显示。将图片缩放至目标矩形的高度,宽度按此比例进行缩放,超出不部分不显示。", - "name": "IMAGE_DRAW_SCALE_H" - }, - { - "desc": "平铺显示。", - "name": "IMAGE_DRAW_REPEAT" - }, - { - "desc": "水平方向平铺显示,垂直方向缩放。", - "name": "IMAGE_DRAW_REPEAT_X" - }, - { - "desc": "垂直方向平铺显示,水平方向缩放。", - "name": "IMAGE_DRAW_REPEAT_Y" - }, - { - "desc": "垂直方向平铺显示,水平方向缩放(从底部到顶部)。", - "name": "IMAGE_DRAW_REPEAT_Y_INVERSE" - }, - { - "desc": "9宫格显示。\n将图片分成等大小的9块,4个角按原大小显示在目标矩形的4个角,左右上下和中间5块分别缩放显示在对应的目标区域。", - "name": "IMAGE_DRAW_PATCH9" - }, - { - "desc": "水平方向3宫格显示,垂直方向居中显示。\n将图片在水平方向上分成等大小的3块,左右两块按原大小显示在目标矩形的左右,中间一块缩放显示在目标区域中间剩余部分。", - "name": "IMAGE_DRAW_PATCH3_X" - }, - { - "desc": "垂直方向3宫格显示,水平方向居中显示。\n将图片在垂直方向上分成等大小的3块,上下两块按原大小显示在目标矩形的上下,中间一块缩放显示在目标区域中间剩余部分。", - "name": "IMAGE_DRAW_PATCH3_Y" - }, - { - "desc": "水平方向3宫格显示,垂直方向缩放显示。\n将图片在水平方向上分成等大小的3块,左右两块按原大小显示在目标矩形的左右,中间一块缩放显示在目标区域中间剩余部分。", - "name": "IMAGE_DRAW_PATCH3_X_SCALE_Y" - }, - { - "desc": "垂直方向3宫格显示,水平方向缩放显示。\n将图片在垂直方向上分成等大小的3块,上下两块按原大小显示在目标矩形的上下,中间一块缩放显示在目标区域中间剩余部分。", - "name": "IMAGE_DRAW_PATCH3_Y_SCALE_X" - }, - { - "desc": "平铺9宫格显示。\n将图片分成4个角和5块平铺块,4个角按原大小显示在目标矩形的4个角,其余5块会平铺对应的目标区域。\n切割方法为(如下图):\n如果图片宽度为奇数,则中间一块为一列数据,如果图片宽度为偶数,则中间一块为二列数据,其他数据分为左右块\n如果图片高度为奇数,则中间一块为一行数据,如果图片高度为偶数,则中间一块为二行数据,其他数据分为上下块\n中间一块数据根据上面两条规则组成4中情况,分别是一列一行数据,一列两行数据,两列一行数据和两行两列数据", - "name": "IMAGE_DRAW_REPEAT9" - }, - { - "desc": "水平方向3宫格显示,垂直方向居中显示。\n将图片在水平方向上分成左右相等两块和中间一块,如果图片宽度为奇数,则中间一块为一列数据,如果图片宽度为偶数,则中间一块为二列数据,其他数据分为左右块。\n左右两块按原大小显示在目标矩形的左右,中间一列像素点平铺显示在目标区域中间剩余部分。", - "name": "IMAGE_DRAW_REPEAT3_X" - }, - { - "desc": "垂直方向3宫格显示,水平方向居中显示。\n将图片在垂直方向上分成上下相等两块和中间一块,如果图片高度为奇数,则中间一块为一行数据,如果图片高度为偶数,则中间一块为二行数据,其他数据分为上下块\n上下两块按原大小显示在目标矩形的上下,中间一块平铺显示在目标区域中间剩余部分。", - "name": "IMAGE_DRAW_REPEAT3_Y" - } - ], - "header": "base/bitmap.h", - "name": "image_draw_type_t", - "prefix": "IMAGE_DRAW_", - "annotation": { - "scriptable": true - }, - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "uint32_t", - "name": "w", - "desc": "离线 canvas 的宽。" - }, - { - "type": "uint32_t", - "name": "h", - "desc": "离线 canvas 的高。" - }, - { - "type": "bitmap_format_t", - "name": "format", - "desc": "离线 canvas 的格式。" - } - ], - "annotation": {}, - "desc": "创建一个离线的 canvas\n在 opengl 模式下 format 参数只能为 BITMAP_FMT_RGBA8888\n在其他模式下,离线 canvas 格式可以为 rgba,bgar,bgr565和rgb565", - "name": "canvas_offline_create", - "return": { - "type": "canvas_t*", - "desc": "成功返回 canvas ,失败返回 NULL。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "canvas", - "desc": "离线 canvas 对象。" - } - ], - "annotation": {}, - "desc": "清除离线 canvas 所有数据,并把背景设置为全透明(注意:该离线 canvas 需要有透明通道)\n该函数调用前必须要先 canvas_offline_begin_draw 函数。\n该函数用来解决离线 canvas 多次绘图半透效果后导致半透效果无效的问题。", - "name": "canvas_offline_clear_canvas", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "canvas", - "desc": "离线 canvas 对象。" - } - ], - "annotation": {}, - "desc": "设置离线 canvas 开始绘图", - "name": "canvas_offline_begin_draw", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "canvas", - "desc": "离线 canvas 对象。" - } - ], - "annotation": {}, - "desc": "设置离线 canvas 结束绘图", - "name": "canvas_offline_end_draw", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "canvas", - "desc": "离线 canvas 对象。" - } - ], - "annotation": {}, - "desc": "获取离线 canvas 的离线 bitmap。", - "name": "canvas_offline_get_bitmap", - "return": { - "type": "bitmap_t*", - "desc": "返回 bitmap_t 对象表示成功,返回 NULL 表示失败。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "canvas", - "desc": "离线 canvas 对象。" - }, - { - "type": "bitmap_t*", - "name": "bitmap", - "desc": "新的 bitmap 对象。" - } - ], - "annotation": {}, - "desc": "把离线 canvas 的离线 bitmap 移动赋值给新的 bitmap。\n移动赋值后原来的离线 canvas 的离线 bitmap 就会被置空。\n备注:在移动赋值之前会先调用 canvas_offline_flush_bitmap 把数据回流到内存中。", - "name": "canvas_offline_bitmap_move_to_new_bitmap", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "canvas", - "desc": "离线 canvas 对象。" - } - ], - "annotation": {}, - "desc": "把离线 canvas 的数据放到绑定的 bitmap 中\n该函数只有在 opengl 模式才需要调用,是否把显存中的数据回传到内存中。", - "name": "canvas_offline_flush_bitmap", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "canvas", - "desc": "离线 canvas 对象。" - } - ], - "annotation": {}, - "desc": "释放离线 canvas 和离线 bitmap", - "name": "canvas_offline_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "uint32_t", - "name": "w", - "desc": "离线 canvas 的宽。" - }, - { - "type": "uint32_t", - "name": "h", - "desc": "离线 canvas 的高。" - }, - { - "type": "bitmap_format_t", - "name": "format", - "desc": "离线 canvas 的格式。" - } - ], - "annotation": {}, - "desc": "用户自定义 canvas_offline_create", - "name": "canvas_offline_custom_create", - "export": "none", - "return": { - "type": "canvas_t*", - "desc": "成功返回 canvas ,失败返回 NULL。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "canvas", - "desc": "离线 canvas 对象。" - } - ], - "annotation": {}, - "desc": "用户自定义 canvas_offline_custom_clear_canvas", - "name": "canvas_offline_custom_clear_canvas", - "export": "none", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "canvas", - "desc": "离线 canvas 对象。" - } - ], - "annotation": {}, - "desc": "用户自定义 canvas_offline_custom_begin_draw", - "name": "canvas_offline_custom_begin_draw", - "export": "none", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "canvas", - "desc": "离线 canvas 对象。" - } - ], - "annotation": {}, - "desc": "用户自定义 canvas_offline_custom_end_draw", - "name": "canvas_offline_custom_end_draw", - "export": "none", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "canvas", - "desc": "离线 canvas 对象。" - } - ], - "annotation": {}, - "desc": "用户自定义 canvas_offline_custom_get_bitmap", - "name": "canvas_offline_custom_get_bitmap", - "export": "none", - "return": { - "type": "bitmap_t*", - "desc": "返回 bitmap_t 对象表示成功,返回 NULL 表示失败。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "canvas", - "desc": "离线 canvas 对象。" - } - ], - "annotation": {}, - "desc": "用户自定义 canvas_offline_custom_bitmap_move_to_new_bitmap", - "name": "canvas_offline_custom_bitmap_move_to_new_bitmap", - "export": "none", - "return": { - "type": "bitmap_t*", - "desc": "返回 bitmap_t 对象表示成功,返回 NULL 表示失败。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "canvas", - "desc": "离线 canvas 对象。" - } - ], - "annotation": {}, - "desc": "用户自定义 canvas_offline_custom_flush_bitmap", - "name": "canvas_offline_custom_flush_bitmap", - "export": "none", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "canvas", - "desc": "离线 canvas 对象。" - } - ], - "annotation": {}, - "desc": "用户自定义 canvas_offline_custom_destroy", - "name": "canvas_offline_custom_destroy", - "export": "none", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [ - { - "name": "bitmap", - "desc": "绑定的离线 bitmap", - "type": "bitmap_t*", - "annotation": { - "readable": true - } - } - ], - "header": "base/canvas_offline.h", - "desc": "离线画布 canvas。", - "name": "canvas_offline_t", - "annotation": { - "scriptable": true - }, - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - }, - { - "type": "lcd_t*", - "name": "lcd", - "desc": "lcd对象。" - }, - { - "type": "font_manager_t*", - "name": "font_manager", - "desc": "字体管理器对象。" - } - ], - "annotation": {}, - "desc": "初始化,系统内部调用。", - "name": "canvas_init", - "return": { - "type": "canvas_t*", - "desc": "返回canvas对象本身。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取画布的宽度。", - "name": "canvas_get_width", - "return": { - "type": "wh_t", - "desc": "返回画布的宽度。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取画布的高度。", - "name": "canvas_get_height", - "return": { - "type": "wh_t", - "desc": "返回画布的高度。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - }, - { - "type": "rect_t*", - "name": "r", - "desc": "rect对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取裁剪区。", - "name": "canvas_get_clip_rect", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - }, - { - "type": "const rect_t*", - "name": "r", - "desc": "rect对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置裁剪区。", - "name": "canvas_set_clip_rect", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - }, - { - "type": "const rect_t*", - "name": "r", - "desc": "rect对象。" - }, - { - "type": "bool_t", - "name": "translate", - "desc": "是否将裁剪区的位置加上canvas当前的偏移。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置裁剪区。", - "name": "canvas_set_clip_rect_ex", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - }, - { - "type": "color_t", - "name": "color", - "desc": "颜色。" - } - ], - "annotation": {}, - "desc": "设置填充颜色。", - "name": "canvas_set_fill_color", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - }, - { - "type": "color_t", - "name": "color", - "desc": "颜色。" - } - ], - "annotation": {}, - "desc": "设置文本颜色。", - "name": "canvas_set_text_color", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - }, - { - "type": "color_t", - "name": "color", - "desc": "颜色。" - } - ], - "annotation": {}, - "desc": "设置线条颜色。", - "name": "canvas_set_stroke_color", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - }, - { - "type": "const char*", - "name": "color", - "desc": "颜色。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置填充颜色。\n\n> 供脚本语言使用。", - "name": "canvas_set_fill_color_str", - "alias": "canvas_set_fill_color", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - }, - { - "type": "const char*", - "name": "color", - "desc": "颜色。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置文本颜色。\n\n> 供脚本语言使用。", - "name": "canvas_set_text_color_str", - "alias": "canvas_set_text_color", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - }, - { - "type": "const char*", - "name": "color", - "desc": "颜色。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置线条颜色。\n\n> 供脚本语言使用。", - "name": "canvas_set_stroke_color_str", - "alias": "canvas_set_stroke_color", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - }, - { - "type": "uint8_t", - "name": "alpha", - "desc": "alpha值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置全局alpha值。", - "name": "canvas_set_global_alpha", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - }, - { - "type": "xy_t", - "name": "dx", - "desc": "x偏移。" - }, - { - "type": "xy_t", - "name": "dy", - "desc": "y偏移。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "平移原点坐标。", - "name": "canvas_translate", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - }, - { - "type": "xy_t", - "name": "dx", - "desc": "x偏移。" - }, - { - "type": "xy_t", - "name": "dy", - "desc": "y偏移。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "反向平移原点坐标。", - "name": "canvas_untranslate", - "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": "h", - "desc": "高度。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "画垂直线。", - "name": "canvas_draw_vline", - "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": "宽度。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "画水平线。", - "name": "canvas_draw_hline", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - }, - { - "type": "const point_t*", - "name": "points", - "desc": "点数组。" - }, - { - "type": "uint32_t", - "name": "nr", - "desc": "点的个数。" - } - ], - "annotation": {}, - "desc": "画多个点。", - "name": "canvas_draw_points", - "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_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": "用填充颜色填充指定矩形。\n\n> 如果lcd的颜色格式带alpha通道,连同alpha的值一起修改。", - "name": "canvas_clear_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_stroke_rect", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "字体名称。" - }, - { - "type": "font_size_t", - "name": "size", - "desc": "字体大小。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置字体。", - "name": "canvas_set_font", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - }, - { - "type": "align_h_t", - "name": "align_h", - "desc": "水平对齐方式。" - }, - { - "type": "align_v_t", - "name": "align_v", - "desc": "垂直对齐方式。" - } - ], - "annotation": {}, - "desc": "设置文本对齐方式。", - "name": "canvas_set_text_align", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - }, - { - "type": "const wchar_t*", - "name": "str", - "desc": "字符串。" - }, - { - "type": "uint32_t", - "name": "nr", - "desc": "字符数。" - } - ], - "annotation": {}, - "desc": "计算文本所占的宽度。", - "name": "canvas_measure_text", - "return": { - "type": "float_t", - "desc": "返回文本所占的宽度。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - } - ], - "annotation": {}, - "desc": "获取字体的高度。", - "name": "canvas_get_font_height", - "return": { - "type": "float_t", - "desc": "返回字体的高度。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - }, - { - "type": "const char*", - "name": "str", - "desc": "字符串。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "计算文本所占的宽度。\n\n> 供脚本语言使用。", - "name": "canvas_measure_utf8", - "alias": "canvas_measure_text", - "return": { - "type": "float_t", - "desc": "返回文本所占的宽度。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - }, - { - "type": "const wchar_t*", - "name": "str", - "desc": "字符串。" - }, - { - "type": "uint32_t", - "name": "nr", - "desc": "字符数。" - }, - { - "type": "xy_t", - "name": "x", - "desc": "x坐标。" - }, - { - "type": "xy_t", - "name": "y", - "desc": "y坐标。" - } - ], - "annotation": {}, - "desc": "绘制文本。", - "name": "canvas_draw_text", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - }, - { - "type": "const char*", - "name": "str", - "desc": "字符串。" - }, - { - "type": "xy_t", - "name": "x", - "desc": "x坐标。" - }, - { - "type": "xy_t", - "name": "y", - "desc": "y坐标。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "绘制文本。\n\n> 供脚本语言使用。", - "name": "canvas_draw_utf8", - "alias": "canvas_draw_text", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - }, - { - "type": "const wchar_t*", - "name": "str", - "desc": "字符串。" - }, - { - "type": "uint32_t", - "name": "nr", - "desc": "字符数。" - }, - { - "type": "const rect_t*", - "name": "r", - "desc": "矩形区域。" - } - ], - "annotation": {}, - "desc": "绘制文本。", - "name": "canvas_draw_text_in_rect", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - }, - { - "type": "const wchar_t*", - "name": "str", - "desc": "字符串。" - }, - { - "type": "uint32_t", - "name": "nr", - "desc": "字符数。" - }, - { - "type": "const rect_t*", - "name": "r", - "desc": "矩形区域。" - }, - { - "type": "const char*", - "name": "bidi_type", - "desc": "类型。" - }, - { - "type": "bool_t", - "name": "ellipses", - "desc": "如果目标宽度不够,是否显示省略号。" - } - ], - "annotation": {}, - "desc": "绘制文本(支持Unicode Bidirectional Algorithm)。", - "name": "canvas_draw_text_bidi_in_rect", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - }, - { - "type": "const char*", - "name": "str", - "desc": "字符串。" - }, - { - "type": "const rect_t*", - "name": "r", - "desc": "矩形区域。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "绘制文本。\n\n> 供脚本语言使用。", - "name": "canvas_draw_utf8_in_rect", - "alias": "canvas_draw_text_in_rect", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - }, - { - "type": "bitmap_t*", - "name": "img", - "desc": "图片对象。" - }, - { - "type": "xy_t", - "name": "cx", - "desc": "中心点x坐标。" - }, - { - "type": "xy_t", - "name": "cy", - "desc": "中心点y坐标。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "绘制图标。", - "name": "canvas_draw_icon", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - }, - { - "type": "bitmap_t*", - "name": "img", - "desc": "图片对象。" - }, - { - "type": "const rect_t*", - "name": "src", - "desc": "源区域。" - }, - { - "type": "const rect_t*", - "name": "dst", - "desc": "目的区域。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "绘制图片。", - "name": "canvas_draw_image", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - }, - { - "type": "bitmap_t*", - "name": "img", - "desc": "图片对象。" - }, - { - "type": "image_draw_type_t", - "name": "draw_type", - "desc": "绘制类型。" - }, - { - "type": "const rect_t*", - "name": "dst", - "desc": "目的区域。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "绘制图片。", - "name": "canvas_draw_image_ex", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - }, - { - "type": "bitmap_t*", - "name": "img", - "desc": "图片对象。" - }, - { - "type": "image_draw_type_t", - "name": "draw_type", - "desc": "绘制类型。" - }, - { - "type": "const rect_t*", - "name": "src", - "desc": "源区域。" - }, - { - "type": "const rect_t*", - "name": "dst", - "desc": "目的区域。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "绘制图片。", - "name": "canvas_draw_image_ex2", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取vgcanvas对象。", - "name": "canvas_get_vgcanvas", - "return": { - "type": "vgcanvas_t*", - "desc": "返回vgcanvas对象。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - } - ], - "annotation": { - "cast": true, - "scriptable": true - }, - "desc": "转换为canvas对象(供脚本语言使用)。", - "name": "canvas_cast", - "return": { - "type": "canvas_t*", - "desc": "canvas对象。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "释放相关资源。", - "name": "canvas_reset", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - }, - { - "type": "bitmap_t*", - "name": "img", - "desc": "图片对象。" - }, - { - "type": "xy_t", - "name": "x", - "desc": "x坐标。" - }, - { - "type": "xy_t", - "name": "y", - "desc": "w坐标。" - } - ], - "annotation": {}, - "desc": "在指定位置画图。", - "name": "canvas_draw_image_at", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - }, - { - "type": "xy_t", - "name": "x1", - "desc": "起始点的x坐标。" - }, - { - "type": "xy_t", - "name": "y1", - "desc": "起始点的y坐标。" - }, - { - "type": "xy_t", - "name": "x2", - "desc": "结束点的x坐标。" - }, - { - "type": "xy_t", - "name": "y2", - "desc": "结束点的y坐标。" - } - ], - "annotation": {}, - "desc": "画直线。", - "name": "canvas_draw_line", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - }, - { - "type": "font_manager_t*", - "name": "font_manager", - "desc": "font_manager对象。" - } - ], - "annotation": {}, - "desc": "设置canvas的font_manager对象。", - "name": "canvas_set_font_manager", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - }, - { - "type": "assets_manager_t*", - "name": "assets_manager", - "desc": "assets_manager对象。" - } - ], - "annotation": {}, - "desc": "设置canvas的assets_manager对象。", - "name": "canvas_set_assets_manager", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "canvas", - "desc": "canvas对象。" - }, - { - "type": "float_t*", - "name": "ascent", - "desc": "用于返回ascent。" - }, - { - "type": "float_t*", - "name": "descent", - "desc": "用于返回descent。" - }, - { - "type": "float_t*", - "name": "line_hight", - "desc": "用于返回line height。" - } - ], - "annotation": {}, - "desc": "获取当前字体的度量信息。", - "name": "canvas_get_text_metrics", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - }, - { - "type": "const rect_t*", - "name": "dirty_rect", - "desc": "脏矩形。" - }, - { - "type": "lcd_draw_mode_t", - "name": "draw_mode", - "desc": "绘制模式。" - } - ], - "annotation": {}, - "desc": "绘制开始。", - "name": "canvas_begin_frame", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - }, - { - "type": "const rect_t*", - "name": "r", - "desc": "矩形。" - }, - { - "type": "const color_t*", - "name": "color", - "desc": "颜色。" - }, - { - "type": "uint32_t", - "name": "radius", - "desc": "圆角半径。" - } - ], - "annotation": {}, - "desc": "填充区域。", - "name": "canvas_fill_rounded_rect", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - }, - { - "type": "const rect_t*", - "name": "r", - "desc": "矩形。" - }, - { - "type": "const color_t*", - "name": "color", - "desc": "颜色。" - }, - { - "type": "uint32_t", - "name": "radius_tl", - "desc": "左上角圆角半径。" - }, - { - "type": "uint32_t", - "name": "radius_tr", - "desc": "右上角圆角半径。" - }, - { - "type": "uint32_t", - "name": "radius_bl", - "desc": "左下角圆角半径。" - }, - { - "type": "uint32_t", - "name": "radius_br", - "desc": "右下角圆角半径。" - } - ], - "annotation": {}, - "desc": "填充区域。\n半径半径小于等于2,则表示该角为直角,如果全部角都为直角则返回RET_FAIL。(如果全是直角,该函数效率没有canvas_fill_rect函数快)\n如果各个半径都不一样的话,就是会使用vg,如果不支持vg就会返回RET_FAIL(直角的情况除外)。", - "name": "canvas_fill_rounded_rect_ex", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - }, - { - "type": "const rect_t*", - "name": "r", - "desc": "矩形。" - }, - { - "type": "const color_t*", - "name": "color", - "desc": "颜色。" - }, - { - "type": "uint32_t", - "name": "radius", - "desc": "圆角半径。" - }, - { - "type": "uint32_t", - "name": "border_width", - "desc": "边宽。" - } - ], - "annotation": {}, - "desc": "绘制边框。", - "name": "canvas_stroke_rounded_rect", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - }, - { - "type": "const rect_t*", - "name": "r", - "desc": "矩形。" - }, - { - "type": "const color_t*", - "name": "color", - "desc": "颜色。" - }, - { - "type": "uint32_t", - "name": "radius_tl", - "desc": "左上角圆角半径。" - }, - { - "type": "uint32_t", - "name": "radius_tr", - "desc": "右上角圆角半径。" - }, - { - "type": "uint32_t", - "name": "radius_bl", - "desc": "左下角圆角半径。" - }, - { - "type": "uint32_t", - "name": "radius_br", - "desc": "右下角圆角半径。" - }, - { - "type": "uint32_t", - "name": "border_width", - "desc": "边宽。" - }, - { - "type": "uint32_t", - "name": "border_model", - "desc": "边框类型。" - } - ], - "annotation": {}, - "desc": "绘制边框。\n半径半径小于等于2,则表示该角为直角,如果全部角都为直角则返回RET_FAIL。(如果全是直角,该函数效率没有canvas_stroke_rect函数快)\n如果各个半径都不一样的话,就是会使用vg,如果不支持vg就会返回RET_FAIL(直角的情况除外)。", - "name": "canvas_stroke_rounded_rect_ex", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - } - ], - "annotation": {}, - "desc": "绘制结束。", - "name": "canvas_end_frame", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [ - { - "name": "ox", - "desc": "x坐标偏移。", - "type": "xy_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "oy", - "desc": "y坐标偏移。", - "type": "xy_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "font_name", - "desc": "当前字体名称。", - "type": "char*", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "font_size", - "desc": "当前字体大小。", - "type": "uint16_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "global_alpha", - "desc": "当前全局alpha。", - "type": "uint8_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "clip_left", - "desc": "当前裁剪矩形的左边位置。", - "type": "xy_t", - "annotation": { - "readable": true - } - }, - { - "name": "clip_top", - "desc": "当前裁剪矩形的顶部位置。", - "type": "xy_t", - "annotation": { - "readable": true - } - }, - { - "name": "clip_right", - "desc": "当前裁剪矩形的右边位置。", - "type": "xy_t", - "annotation": { - "readable": true - } - }, - { - "name": "clip_bottom", - "desc": "当前裁剪矩形的底部位置。", - "type": "xy_t", - "annotation": { - "readable": true - } - }, - { - "name": "fps", - "desc": "当前的帧率。", - "type": "uint32_t", - "annotation": { - "readable": true - } - }, - { - "name": "show_fps", - "desc": "是否显示帧率。", - "type": "bool_t", - "annotation": { - "readable": true - } - }, - { - "name": "text_align_v", - "desc": "文本垂直对齐方式。", - "type": "align_v_t", - "annotation": { - "readable": true - } - }, - { - "name": "text_align_h", - "desc": "文本水平对齐方式。", - "type": "align_h_t", - "annotation": { - "readable": true - } - }, - { - "name": "lcd", - "desc": "lcd对象。", - "type": "lcd_t*", - "annotation": { - "readable": true - } - }, - { - "name": "font", - "desc": "字体对象。", - "type": "font_t*", - "annotation": { - "readable": true - } - }, - { - "name": "font_manager", - "desc": "字体管理器对象。", - "type": "font_manager_t*", - "annotation": { - "readable": true - } - }, - { - "name": "assets_manager", - "desc": "资源管理器对象。", - "type": "assets_manager_t*", - "annotation": { - "readable": true - } - } - ], - "header": "base/canvas.h", - "desc": "提供基本的绘图功能和状态管理。", - "name": "canvas_t", - "annotation": { - "scriptable": true - }, - "level": 1 - }, { "type": "class", "methods": [ @@ -6885,6 +4644,21 @@ }, "level": 1 }, + { + "params": [], + "annotation": { + "global": true + }, + "desc": "初始化AWTK控件。", + "name": "tk_widgets_init", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + }, + "type": "method", + "header": "widgets/widgets.h", + "level": 1 + }, { "type": "class", "methods": [ @@ -7315,6 +5089,84 @@ }, "level": 1 }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "type": "widget_t*", + "name": "widget", + "desc": "控件对象。" + }, + { + "type": "uint32_t", + "name": "duration", + "desc": "动画持续时间。" + }, + { + "type": "uint32_t", + "name": "delay", + "desc": "动画执行时间。" + }, + { + "type": "easing_type_t", + "name": "easing", + "desc": "插值函数类型。" + } + ], + "annotation": {}, + "desc": "创建动画对象。", + "name": "widget_animator_scroll_create", + "return": { + "type": "widget_animator_t*", + "desc": "成功返回动画对象,失败返回NULL。" + } + }, + { + "params": [ + { + "type": "widget_animator_t*", + "name": "animator", + "desc": "动画对象本身。" + }, + { + "type": "xy_t", + "name": "x_from", + "desc": "x起点值。" + }, + { + "type": "xy_t", + "name": "y_from", + "desc": "y起点值。" + }, + { + "type": "xy_t", + "name": "x_to", + "desc": "x终点值。" + }, + { + "type": "xy_t", + "name": "y_to", + "desc": "y终点值。" + } + ], + "annotation": {}, + "desc": "设置动画对象的参数。", + "name": "widget_animator_scroll_set_params", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + } + ], + "events": [], + "properties": [], + "header": "widget_animators/widget_animator_scroll.h", + "desc": "滚动控件的动画。\n本动画也可以用widget_animator_prop2实现,但滚动控件需要访问内部数据结构,出于可读性考虑保留独立实现。", + "name": "widget_animator_scroll_t", + "level": 1 + }, { "type": "class", "methods": [ @@ -7921,6 +5773,1109 @@ }, "level": 1 }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "type": "widget_t*", + "name": "widget", + "desc": "控件对象。" + }, + { + "type": "uint32_t", + "name": "duration", + "desc": "动画持续时间。" + }, + { + "type": "uint32_t", + "name": "delay", + "desc": "动画执行时间。" + }, + { + "type": "easing_type_t", + "name": "easing", + "desc": "插值函数类型。" + }, + { + "type": "const char*", + "name": "prop1_name", + "desc": "属性1的名称。" + }, + { + "type": "const char*", + "name": "prop2_name", + "desc": "属性2的名称。" + } + ], + "annotation": {}, + "desc": "创建双属性动画对象。", + "name": "widget_animator_prop2_create", + "return": { + "type": "widget_animator_t*", + "desc": "成功返回动画对象,失败返回NULL。" + } + }, + { + "params": [ + { + "type": "widget_animator_t*", + "name": "animator", + "desc": "动画对象本身。" + }, + { + "type": "double", + "name": "from1", + "desc": "x的初值。" + }, + { + "type": "double", + "name": "from2", + "desc": "y的初值。" + }, + { + "type": "double", + "name": "to1", + "desc": "x的终值。" + }, + { + "type": "double", + "name": "to2", + "desc": "y的终值。" + } + ], + "annotation": {}, + "desc": "设置动画对象的参数。", + "name": "widget_animator_prop2_set_params", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + } + ], + "events": [], + "properties": [], + "header": "widget_animators/widget_animator_prop2.h", + "desc": "通过修改对象的两个指定属性形成动画效果。", + "name": "widget_animator_prop2_t", + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "type": "widget_t*", + "name": "widget", + "desc": "控件对象。" + }, + { + "type": "uint32_t", + "name": "duration", + "desc": "动画持续时间。" + }, + { + "type": "uint32_t", + "name": "delay", + "desc": "动画执行时间。" + }, + { + "type": "easing_type_t", + "name": "easing", + "desc": "插值函数类型。" + }, + { + "type": "const char*", + "name": "prop_name", + "desc": "属性的名称。" + } + ], + "annotation": {}, + "desc": "创建单属性动画对象。", + "name": "widget_animator_prop_create", + "return": { + "type": "widget_animator_t*", + "desc": "成功返回动画对象,失败返回NULL。" + } + }, + { + "params": [ + { + "type": "widget_animator_t*", + "name": "animator", + "desc": "动画对象本身。" + }, + { + "type": "double", + "name": "from", + "desc": "prop起始值。" + }, + { + "type": "double", + "name": "to", + "desc": "prop结束值。" + } + ], + "annotation": {}, + "desc": "设置动画对象的参数。", + "name": "widget_animator_prop_set_params", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + } + ], + "events": [], + "properties": [], + "header": "widget_animators/widget_animator_prop.h", + "desc": "通过修改对象的指定属性形成动画效果。", + "name": "widget_animator_prop_t", + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "type": "ubjson_writer_t*", + "name": "writer", + "desc": "writer对象。" + }, + { + "type": "ubjson_write_callback_t", + "name": "write", + "desc": "真正写入数据的函数。" + }, + { + "type": "void*", + "name": "ctx", + "desc": "write函数的上下文。" + } + ], + "annotation": {}, + "desc": "初始化。", + "name": "ubjson_writer_init", + "return": { + "type": "ubjson_writer_t*", + "desc": "返回writer对象。" + } + }, + { + "params": [ + { + "type": "ubjson_writer_t*", + "name": "writer", + "desc": "writer对象。" + }, + { + "type": "const char*", + "name": "value", + "desc": "key的名称。" + } + ], + "annotation": {}, + "desc": "写入key。", + "name": "ubjson_writer_write_key", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "ubjson_writer_t*", + "name": "writer", + "desc": "writer对象。" + } + ], + "annotation": {}, + "desc": "写入null。", + "name": "ubjson_writer_write_null", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "ubjson_writer_t*", + "name": "writer", + "desc": "writer对象。" + } + ], + "annotation": {}, + "desc": "写入noop。", + "name": "ubjson_writer_write_noop", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "ubjson_writer_t*", + "name": "writer", + "desc": "writer对象。" + } + ], + "annotation": {}, + "desc": "写入true。", + "name": "ubjson_writer_write_true", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "ubjson_writer_t*", + "name": "writer", + "desc": "writer对象。" + } + ], + "annotation": {}, + "desc": "写入false。", + "name": "ubjson_writer_write_false", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "ubjson_writer_t*", + "name": "writer", + "desc": "writer对象。" + }, + { + "type": "int32_t", + "name": "value", + "desc": "要写入的值。" + } + ], + "annotation": {}, + "desc": "写入int。", + "name": "ubjson_writer_write_int", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "ubjson_writer_t*", + "name": "writer", + "desc": "writer对象。" + }, + { + "type": "int8_t", + "name": "value", + "desc": "要写入的值。" + } + ], + "annotation": {}, + "desc": "写入int8。", + "name": "ubjson_writer_write_int8", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "ubjson_writer_t*", + "name": "writer", + "desc": "writer对象。" + }, + { + "type": "uint8_t", + "name": "value", + "desc": "要写入的值。" + } + ], + "annotation": {}, + "desc": "写入uint8。", + "name": "ubjson_writer_write_uint8", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "ubjson_writer_t*", + "name": "writer", + "desc": "writer对象。" + }, + { + "type": "int16_t", + "name": "value", + "desc": "要写入的值。" + } + ], + "annotation": {}, + "desc": "写入int16。", + "name": "ubjson_writer_write_int16", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "ubjson_writer_t*", + "name": "writer", + "desc": "writer对象。" + }, + { + "type": "int32_t", + "name": "value", + "desc": "要写入的值。" + } + ], + "annotation": {}, + "desc": "写入int32。", + "name": "ubjson_writer_write_int32", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "ubjson_writer_t*", + "name": "writer", + "desc": "writer对象。" + }, + { + "type": "int64_t", + "name": "value", + "desc": "要写入的值。" + } + ], + "annotation": {}, + "desc": "写入int64。", + "name": "ubjson_writer_write_int64", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "ubjson_writer_t*", + "name": "writer", + "desc": "writer对象。" + }, + { + "type": "float", + "name": "value", + "desc": "要写入的值。" + } + ], + "annotation": {}, + "desc": "写入float。", + "name": "ubjson_writer_write_float32", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "ubjson_writer_t*", + "name": "writer", + "desc": "writer对象。" + }, + { + "type": "double", + "name": "value", + "desc": "要写入的值。" + } + ], + "annotation": {}, + "desc": "写入double。", + "name": "ubjson_writer_write_float64", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "ubjson_writer_t*", + "name": "writer", + "desc": "writer对象。" + }, + { + "type": "char", + "name": "value", + "desc": "要写入的值。" + } + ], + "annotation": {}, + "desc": "写入char。", + "name": "ubjson_writer_write_char", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "ubjson_writer_t*", + "name": "writer", + "desc": "writer对象。" + }, + { + "type": "const char*", + "name": "value", + "desc": "要写入的字符串。" + } + ], + "annotation": {}, + "desc": "写入str。", + "name": "ubjson_writer_write_str", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "ubjson_writer_t*", + "name": "writer", + "desc": "writer对象。" + }, + { + "type": "const char*", + "name": "value", + "desc": "要写入的字符串。" + }, + { + "type": "uint32_t", + "name": "len", + "desc": "字符串的长度。" + } + ], + "annotation": {}, + "desc": "写入str。", + "name": "ubjson_writer_write_str_len", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "ubjson_writer_t*", + "name": "writer", + "desc": "writer对象。" + }, + { + "type": "object_t*", + "name": "obj", + "desc": "要写入的对象。" + } + ], + "annotation": {}, + "desc": "写入obj。", + "name": "ubjson_writer_write_object", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "ubjson_writer_t*", + "name": "writer", + "desc": "writer对象。" + } + ], + "annotation": {}, + "desc": "写入数组开始。\n> 即: [", + "name": "ubjson_writer_write_array_begin", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "ubjson_writer_t*", + "name": "writer", + "desc": "writer对象。" + } + ], + "annotation": {}, + "desc": "写入数组结束。\n> 即: ]", + "name": "ubjson_writer_write_array_end", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "ubjson_writer_t*", + "name": "writer", + "desc": "writer对象。" + } + ], + "annotation": {}, + "desc": "写入对象开始。\n> 即: {", + "name": "ubjson_writer_write_object_begin", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "ubjson_writer_t*", + "name": "writer", + "desc": "writer对象。" + } + ], + "annotation": {}, + "desc": "写入对象结束。\n> 即:}", + "name": "ubjson_writer_write_object_end", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "ubjson_writer_t*", + "name": "writer", + "desc": "writer对象。" + }, + { + "type": "const void*", + "name": "data", + "desc": "数据。" + }, + { + "type": "uint32_t", + "name": "size", + "desc": "数据长度。" + } + ], + "annotation": {}, + "desc": "写入二进制数据。", + "name": "ubjson_writer_write_data", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "ubjson_writer_t*", + "name": "writer", + "desc": "writer对象。" + }, + { + "type": "const char*", + "name": "key", + "desc": "键值。" + } + ], + "annotation": {}, + "desc": "写key和对象的开始。\n\n> 即:\"key\": {", + "name": "ubjson_writer_write_kv_object_begin", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "ubjson_writer_t*", + "name": "writer", + "desc": "writer对象。" + }, + { + "type": "const char*", + "name": "key", + "desc": "键名。" + }, + { + "type": "object_t*", + "name": "value", + "desc": "对象。" + } + ], + "annotation": {}, + "desc": "写key和对象。\n\n> 即:\"key\": { object }", + "name": "ubjson_writer_write_kv_object", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "ubjson_writer_t*", + "name": "writer", + "desc": "writer对象。" + }, + { + "type": "const char*", + "name": "key", + "desc": "键名。" + }, + { + "type": "int32_t", + "name": "value", + "desc": "值。" + } + ], + "annotation": {}, + "desc": "写入key和int的值。\n\n> 即:\"key\": value", + "name": "ubjson_writer_write_kv_int", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "ubjson_writer_t*", + "name": "writer", + "desc": "writer对象。" + }, + { + "type": "const char*", + "name": "key", + "desc": "键名。" + }, + { + "type": "int64_t", + "name": "value", + "desc": "值。" + } + ], + "annotation": {}, + "desc": "写入key和int64_t的值。\n\n> 即:\"key\": value", + "name": "ubjson_writer_write_kv_int64", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "ubjson_writer_t*", + "name": "writer", + "desc": "writer对象。" + }, + { + "type": "const char*", + "name": "key", + "desc": "键名。" + }, + { + "type": "float", + "name": "value", + "desc": "值。" + } + ], + "annotation": {}, + "desc": "写入key和float的值。\n\n> 即:\"key\": value", + "name": "ubjson_writer_write_kv_float", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "ubjson_writer_t*", + "name": "writer", + "desc": "writer对象。" + }, + { + "type": "const char*", + "name": "key", + "desc": "键名。" + }, + { + "type": "double", + "name": "value", + "desc": "值。" + } + ], + "annotation": {}, + "desc": "写入key和double的值。\n\n> 即:\"key\": value", + "name": "ubjson_writer_write_kv_double", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "ubjson_writer_t*", + "name": "writer", + "desc": "writer对象。" + }, + { + "type": "const char*", + "name": "key", + "desc": "键名。" + }, + { + "type": "bool_t", + "name": "value", + "desc": "值。" + } + ], + "annotation": {}, + "desc": "写入key和bool的值。\n\n> 即:\"key\": value", + "name": "ubjson_writer_write_kv_bool", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "ubjson_writer_t*", + "name": "writer", + "desc": "writer对象。" + }, + { + "type": "const char*", + "name": "key", + "desc": "键名。" + }, + { + "type": "const char*", + "name": "value", + "desc": "字符串。" + } + ], + "annotation": {}, + "desc": "写入key和str的值。\n\n> 即:\"key\": value", + "name": "ubjson_writer_write_kv_str", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "ubjson_writer_t*", + "name": "writer", + "desc": "writer对象。" + }, + { + "type": "const char*", + "name": "key", + "desc": "键名。" + }, + { + "type": "const char*", + "name": "value", + "desc": "字符串。" + }, + { + "type": "uint32_t", + "name": "len", + "desc": "字符串的长度。" + } + ], + "annotation": {}, + "desc": "写入key和str的值。\n\n> 即:\"key\": value", + "name": "ubjson_writer_write_kv_str_len", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "ubjson_writer_t*", + "name": "writer", + "desc": "writer对象。" + }, + { + "type": "const char*", + "name": "key", + "desc": "键名。" + }, + { + "type": "value_t*", + "name": "value", + "desc": "值。" + } + ], + "annotation": {}, + "desc": "写入key和value_t的值。\n\n> 即:\"key\": value", + "name": "ubjson_writer_write_kv_value", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + } + ], + "events": [], + "properties": [], + "header": "ubjson/ubjson_writer.h", + "desc": "ubjson writer", + "name": "ubjson_writer_t", + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "type": "void*", + "name": "data", + "desc": "数据。" + }, + { + "type": "uint32_t", + "name": "size", + "desc": "数据的长度。" + }, + { + "type": "ubjson_on_key_value_t", + "name": "on_key_value", + "desc": "回调函数。" + }, + { + "type": "void*", + "name": "ctx", + "desc": "回调函数的上下文。" + } + ], + "annotation": { + "static": true + }, + "desc": "解析ubjson数据,遇到key/value时调用提供的回调函数。", + "name": "ubjson_parse", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "void*", + "name": "data", + "desc": "数据。" + }, + { + "type": "uint32_t", + "name": "size", + "desc": "数据的长度。" + } + ], + "annotation": { + "static": true + }, + "desc": "解析ubjson数据,生成object对象。", + "name": "ubjson_to_object", + "return": { + "type": "void*", + "desc": "返回object表示的数据。" + } + }, + { + "params": [ + { + "type": "void*", + "name": "data", + "desc": "数据。" + }, + { + "type": "uint32_t", + "name": "size", + "desc": "数据的长度。" + } + ], + "annotation": { + "static": true + }, + "desc": "将ubjson数据打印到控制台。", + "name": "ubjson_dump", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + } + ], + "events": [], + "properties": [], + "header": "ubjson/ubjson_parser.h", + "desc": "ubjson parser", + "name": "ubjson_parser_t", + "annotation": { + "fake": true + }, + "level": 1 + }, + { + "params": [ + { + "type": "const wchar_t*", + "name": "s", + "desc": "源字符串。" + } + ], + "annotation": { + "global": true + }, + "desc": "获取一个新的内存保存s串。", + "name": "wcs_dup", + "return": { + "type": "wchar_t*", + "desc": "返回新的字符串地址。" + }, + "type": "method", + "header": "tkc/wstr.h", + "level": 1 + }, + { + "params": [ + { + "type": "const wchar_t*", + "name": "s", + "desc": "串地址。" + } + ], + "annotation": { + "global": true + }, + "desc": "获取字符串长度。", + "name": "wcs_len", + "return": { + "type": "size_t", + "desc": "返回串长度'\\0'结尾。" + }, + "type": "method", + "header": "tkc/wstr.h", + "level": 1 + }, + { + "params": [ + { + "type": "const wchar_t*", + "name": "s1", + "desc": "目标串。" + }, + { + "type": "const wchar_t*", + "name": "s2", + "desc": "源串。" + } + ], + "annotation": { + "global": true + }, + "desc": "比较字符串", + "name": "wcs_cmp", + "return": { + "type": "int", + "desc": "小于0表示s1s2。" + }, + "type": "method", + "header": "tkc/wstr.h", + "level": 1 + }, + { + "params": [ + { + "type": "wchar_t*", + "name": "s1", + "desc": "目标串。" + }, + { + "type": "const wchar_t*", + "name": "s2", + "desc": "源串。" + } + ], + "annotation": { + "global": true + }, + "desc": "复制字符串", + "name": "wcs_cpy", + "return": { + "type": "const wchar_t*", + "desc": "复制后的串地址。" + }, + "type": "method", + "header": "tkc/wstr.h", + "level": 1 + }, + { + "params": [ + { + "type": "const wchar_t*", + "name": "s", + "desc": "wchar_t*。" + }, + { + "type": "wchar_t", + "name": "c", + "desc": "wchar_t。" + } + ], + "annotation": { + "global": true + }, + "desc": "查找字符位置", + "name": "wcs_chr", + "return": { + "type": "const wchar_t*", + "desc": "返回找到c的地址。" + }, + "type": "method", + "header": "tkc/wstr.h", + "level": 1 + }, { "type": "class", "methods": [ @@ -9101,6 +8056,537 @@ }, "level": 1 }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "type": "wstr_t*", + "name": "str", + "desc": "str对象。" + }, + { + "type": "uint32_t", + "name": "capacity", + "desc": "初始容量。" + } + ], + "annotation": { + "constructor": true + }, + "desc": "初始化字符串对象。", + "name": "wstr_init", + "return": { + "type": "wstr_t*", + "desc": "str对象本身。" + } + }, + { + "params": [ + { + "type": "wstr_t*", + "name": "str", + "desc": "str对象。" + }, + { + "type": "wchar_t*", + "name": "text", + "desc": "要设置的字符串。" + } + ], + "annotation": {}, + "desc": "设置字符串。", + "name": "wstr_set", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "wstr_t*", + "name": "str", + "desc": "str对象。" + } + ], + "annotation": {}, + "desc": "清除字符串内容。", + "name": "wstr_clear", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "wstr_t*", + "name": "str", + "desc": "str对象。" + }, + { + "type": "char*", + "name": "text", + "desc": "要设置的字符串。" + } + ], + "annotation": {}, + "desc": "设置UTF8字符串。", + "name": "wstr_set_utf8", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "wstr_t*", + "name": "str", + "desc": "str对象。" + }, + { + "type": "char*", + "name": "text", + "desc": "返回的字符串。" + }, + { + "type": "uint32_t", + "name": "size", + "desc": "text最大长度。" + } + ], + "annotation": {}, + "desc": "获取UTF8字符串。", + "name": "wstr_get_utf8", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "wstr_t*", + "name": "str", + "desc": "str对象。" + }, + { + "type": "uint32_t", + "name": "offset", + "desc": "指定的位置。" + }, + { + "type": "uint32_t", + "name": "nr", + "desc": "要删除的字符数。" + } + ], + "annotation": {}, + "desc": "删除指定范围的字符。", + "name": "wstr_remove", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "wstr_t*", + "name": "str", + "desc": "str对象。" + }, + { + "type": "uint32_t", + "name": "offset", + "desc": "指定的位置。" + }, + { + "type": "wchar_t*", + "name": "text", + "desc": "待插入的文本。" + }, + { + "type": "uint32_t", + "name": "nr", + "desc": "要插入的字符数。" + } + ], + "annotation": {}, + "desc": "在指定位置插入字符串。", + "name": "wstr_insert", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "wstr_t*", + "name": "str", + "desc": "str对象。" + }, + { + "type": "wchar_t*", + "name": "text", + "desc": "要追加的字符串。" + } + ], + "annotation": {}, + "desc": "追加字符串。", + "name": "wstr_append", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "wstr_t*", + "name": "str", + "desc": "str对象。" + }, + { + "type": "wchar_t*", + "name": "text", + "desc": "要追加的字符串。" + }, + { + "type": "uint32_t", + "name": "len", + "desc": "字符串长度。" + } + ], + "annotation": {}, + "desc": "追加字符串。", + "name": "wstr_append_with_len", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "wstr_t*", + "name": "str", + "desc": "str对象。" + }, + { + "type": "wchar_t", + "name": "c", + "desc": "字符。" + } + ], + "annotation": {}, + "desc": "追加一个字符。", + "name": "wstr_push", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "wstr_t*", + "name": "str", + "desc": "str对象。" + } + ], + "annotation": {}, + "desc": "删除尾部字符。", + "name": "wstr_pop", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "wstr_t*", + "name": "str", + "desc": "str对象。" + }, + { + "type": "const char*", + "name": "format", + "desc": "格式(用于snprintf格式化数值)" + }, + { + "type": "int32_t", + "name": "value", + "desc": "数值。" + } + ], + "annotation": {}, + "desc": "追加一个整数。", + "name": "wstr_push_int", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "wstr_t*", + "name": "str", + "desc": "str对象。" + }, + { + "type": "wstr_t*", + "name": "other", + "desc": "str对象。" + } + ], + "annotation": {}, + "desc": "判断两个字符是否相同。", + "name": "wstr_equal", + "return": { + "type": "bool_t", + "desc": "返回TRUE表示相同,否则表示不同。" + } + }, + { + "params": [ + { + "type": "wstr_t*", + "name": "str", + "desc": "str对象。" + }, + { + "type": "int32_t", + "name": "v", + "desc": "整数。" + } + ], + "annotation": {}, + "desc": "用整数初始化字符串。", + "name": "wstr_from_int", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "wstr_t*", + "name": "str", + "desc": "str对象。" + }, + { + "type": "double", + "name": "v", + "desc": "浮点数。" + } + ], + "annotation": {}, + "desc": "用浮点数初始化字符串。", + "name": "wstr_from_float", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "wstr_t*", + "name": "str", + "desc": "str对象。" + }, + { + "type": "value_t", + "name": "v", + "desc": "value。" + } + ], + "annotation": {}, + "desc": "用value初始化字符串。", + "name": "wstr_from_value", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "wstr_t*", + "name": "str", + "desc": "str对象。" + }, + { + "type": "int32_t*", + "name": "v", + "desc": "用于返回整数。" + } + ], + "annotation": {}, + "desc": "将字符串转成整数。", + "name": "wstr_to_int", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "wstr_t*", + "name": "str", + "desc": "str对象。" + }, + { + "type": "double*", + "name": "v", + "desc": "用于返回浮点数。" + } + ], + "annotation": {}, + "desc": "将字符串转成浮点数。", + "name": "wstr_to_float", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "wstr_t*", + "name": "str", + "desc": "str对象。" + }, + { + "type": "double", + "name": "delta", + "desc": "要加上的值。" + } + ], + "annotation": {}, + "desc": "将字符串转成浮点数,加上delta,再转换回来。", + "name": "wstr_add_float", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "wstr_t*", + "name": "str", + "desc": "str对象。" + } + ], + "annotation": {}, + "desc": "去掉浮点数小数点尾部的零。", + "name": "wstr_trim_float_zero", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "wstr_t*", + "name": "str", + "desc": "str对象。" + }, + { + "type": "wchar_t", + "name": "newline", + "desc": "换行符。" + } + ], + "annotation": {}, + "desc": "规范化换行符。", + "name": "wstr_normalize_newline", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "wstr_t*", + "name": "str", + "desc": "str对象。" + }, + { + "type": "wchar_t", + "name": "c", + "desc": "字符。" + } + ], + "annotation": {}, + "desc": "统计指定字符的个数。", + "name": "wstr_count_char", + "return": { + "type": "uint32_t", + "desc": "返回指定字符的个数。" + } + }, + { + "params": [ + { + "type": "wstr_t*", + "name": "str", + "desc": "str对象。" + } + ], + "annotation": {}, + "desc": "重置字符串为空。", + "name": "wstr_reset", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + } + ], + "events": [], + "properties": [ + { + "name": "size", + "desc": "长度。", + "type": "uint32_t", + "annotation": { + "readable": true + } + }, + { + "name": "capacity", + "desc": "容量。", + "type": "uint32_t", + "annotation": { + "readable": true + } + }, + { + "name": "str", + "desc": "字符串。", + "type": "wchar_t*", + "annotation": { + "readable": true + } + } + ], + "header": "tkc/wstr.h", + "desc": "可变长度的宽字符字符串。\n\n示例:\n\n```c\nwstr_t s;\nwstr_init(&s, 0);\n\nwstr_append(&s, L\"abc\");\nwstr_append(&s, L\"123\");\n\nwstr_reset(&s);\n```\n> 先调wstr\\_init进行初始化,最后调用wstr\\_reset释放内存。", + "name": "wstr_t", + "level": 1 + }, { "type": "class", "methods": [ @@ -9745,6 +9231,247 @@ }, "level": 1 }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "type": "uint32_t", + "name": "capacity", + "desc": "容量。" + }, + { + "type": "uint32_t", + "name": "block_size", + "desc": "块的大小。" + } + ], + "annotation": { + "constructor": true + }, + "desc": "创建waitable_ring_buffer对象。", + "name": "waitable_ring_buffer_create", + "return": { + "type": "waitable_ring_buffer_t*", + "desc": "waitable_ring_buffer对象。" + } + }, + { + "params": [ + { + "type": "waitable_ring_buffer_t*", + "name": "rb", + "desc": "waitable_ring_buffer对象。" + }, + { + "type": "void*", + "name": "buff", + "desc": "接收数据的buff。" + }, + { + "type": "uint32_t", + "name": "size", + "desc": "读取数据的长度(必须等于 block_size)。" + }, + { + "type": "uint32_t", + "name": "timeout_ms", + "desc": "超时时间(ms)" + } + ], + "annotation": {}, + "desc": "读取数据。", + "name": "waitable_ring_buffer_read", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "waitable_ring_buffer_t*", + "name": "rb", + "desc": "waitable_ring_buffer对象。" + }, + { + "type": "const void*", + "name": "buff", + "desc": "要写入的数据。" + }, + { + "type": "uint32_t", + "name": "size", + "desc": "数据的长度(必须等于 block_size)。" + }, + { + "type": "uint32_t", + "name": "timeout_ms", + "desc": "超时时间(ms)" + } + ], + "annotation": {}, + "desc": "写入数据。", + "name": "waitable_ring_buffer_write", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "waitable_ring_buffer_t*", + "name": "rb", + "desc": "waitable_ring_buffer对象。" + } + ], + "annotation": {}, + "desc": "销毁。", + "name": "waitable_ring_buffer_destroy", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + } + ], + "events": [], + "properties": [], + "header": "tkc/waitable_ring_buffer.h", + "desc": "waitable ring buffer", + "name": "waitable_ring_buffer_t", + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "type": "uint32_t", + "name": "capacity", + "desc": "action的容量。" + } + ], + "annotation": { + "constructor": true + }, + "desc": "创建waitable_action_queue对象。", + "name": "waitable_action_queue_create", + "return": { + "type": "waitable_action_queue_t*", + "desc": "waitable_action_queue对象。" + } + }, + { + "params": [ + { + "type": "waitable_action_queue_t*", + "name": "q", + "desc": "waitable_action_queue对象。" + }, + { + "type": "qaction_t**", + "name": "action", + "desc": "用于返回action对象。" + }, + { + "type": "uint32_t", + "name": "timeout_ms", + "desc": "超时时间(ms)" + } + ], + "annotation": {}, + "desc": "接收一个请求。", + "name": "waitable_action_queue_recv", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "waitable_action_queue_t*", + "name": "q", + "desc": "waitable_action_queue对象。" + }, + { + "type": "qaction_t*", + "name": "action", + "desc": "action对象。" + }, + { + "type": "uint32_t", + "name": "timeout_ms", + "desc": "超时时间(ms)" + } + ], + "annotation": {}, + "desc": "发送一个请求。", + "name": "waitable_action_queue_send", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "waitable_action_queue_t*", + "name": "q", + "desc": "waitable_action_queue对象。" + } + ], + "annotation": {}, + "desc": "销毁。", + "name": "waitable_action_queue_destroy", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + } + ], + "events": [], + "properties": [], + "header": "tkc/waitable_action_queue.h", + "desc": "waitable actionqueue", + "name": "waitable_action_queue_t", + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "type": "const char**", + "name": "attrs", + "desc": "属性列表。" + }, + { + "type": "const char*", + "name": "attr", + "desc": "属性名。" + } + ], + "annotation": {}, + "desc": "获取属性。", + "name": "xml_builder_get_attr", + "return": { + "type": "const char*", + "desc": "返回属性的值。" + } + } + ], + "events": [], + "properties": [], + "header": "xml/xml_builder.h", + "desc": "xml builder interface", + "name": "xml_builder_t", + "level": 1 + }, { "type": "class", "methods": [ @@ -10933,6 +10660,103 @@ "header": "base/layout.h", "level": 1 }, + { + "type": "enum", + "desc": "类型常量定义。", + "consts": [ + { + "desc": "无效类型。", + "name": "VALUE_TYPE_INVALID" + }, + { + "desc": "BOOL类型。", + "name": "VALUE_TYPE_BOOL" + }, + { + "desc": "int8_t类型。", + "name": "VALUE_TYPE_INT8" + }, + { + "desc": "uint8_t类型。", + "name": "VALUE_TYPE_UINT8" + }, + { + "desc": "int16_t类型。", + "name": "VALUE_TYPE_INT16" + }, + { + "desc": "uint16_t类型。", + "name": "VALUE_TYPE_UINT16" + }, + { + "desc": "int32_t类型。", + "name": "VALUE_TYPE_INT32" + }, + { + "desc": "uint32_t类型。", + "name": "VALUE_TYPE_UINT32" + }, + { + "desc": "int64_t类型。", + "name": "VALUE_TYPE_INT64" + }, + { + "desc": "uint64_t类型。", + "name": "VALUE_TYPE_UINT64" + }, + { + "desc": "void*类型。", + "name": "VALUE_TYPE_POINTER" + }, + { + "desc": "float_t类型。", + "name": "VALUE_TYPE_FLOAT" + }, + { + "desc": "float类型。", + "name": "VALUE_TYPE_FLOAT32" + }, + { + "desc": "double类型。", + "name": "VALUE_TYPE_DOUBLE" + }, + { + "desc": "char*类型。", + "name": "VALUE_TYPE_STRING" + }, + { + "desc": "wchar_t*类型。", + "name": "VALUE_TYPE_WSTRING" + }, + { + "desc": "object_t*类型。", + "name": "VALUE_TYPE_OBJECT" + }, + { + "desc": "带长度的字符串。", + "name": "VALUE_TYPE_SIZED_STRING" + }, + { + "desc": "二进制数据。", + "name": "VALUE_TYPE_BINARY" + }, + { + "desc": "二进制数据(UBJSON)。", + "name": "VALUE_TYPE_UBJSON" + }, + { + "desc": "特殊用途。", + "name": "VALUE_TYPE_TOKEN" + } + ], + "header": "tkc/value.h", + "name": "value_type_t", + "prefix": "VALUE_TYPE_", + "annotation": { + "scriptable": true + }, + "level": 1 + }, { "type": "enum", "desc": "LCD绘制模式常量定义。", @@ -12327,6 +12151,33 @@ "name": "main_loop_t", "level": 1 }, + { + "type": "class", + "methods": [], + "events": [], + "properties": [ + { + "name": "defvalue", + "desc": "缺省值。", + "type": "const char*", + "annotation": { + "readable": true + } + }, + { + "name": "enums", + "desc": "枚举值。", + "type": "const char**", + "annotation": { + "readable": true + } + } + ], + "header": "tkc/value_desc.h", + "desc": "字符串枚举类型属性描述。", + "name": "value_desc_string_enums_t", + "level": 1 + }, { "type": "class", "methods": [ @@ -12862,6 +12713,65 @@ "name": "shortcut_t", "level": 1 }, + { + "type": "class", + "methods": [], + "events": [], + "properties": [ + { + "name": "type", + "desc": "类型。", + "type": "uint8_t", + "annotation": { + "readable": true + } + }, + { + "name": "format", + "desc": "格式。", + "type": "uint8_t", + "annotation": { + "readable": true + } + }, + { + "name": "flags", + "desc": "flags。", + "type": "uint8_t", + "annotation": { + "readable": true + } + }, + { + "name": "name", + "desc": "名称。", + "type": "const char*", + "annotation": { + "readable": true + } + }, + { + "name": "display_name", + "desc": "显示名称。", + "type": "const char*", + "annotation": { + "readable": true + } + }, + { + "name": "desc", + "desc": "描述。", + "type": "const char*", + "annotation": { + "readable": true + } + } + ], + "header": "tkc/value_desc.h", + "desc": "属性描述。", + "name": "value_desc_t", + "level": 1 + }, { "type": "class", "methods": [ @@ -12923,6 +12833,20 @@ "name": "style_factory_t", "level": 1 }, + { + "type": "enum", + "desc": "参数描述范围常量定义。", + "consts": [ + { + "desc": "必须提供。", + "name": "ARG_DESC_FLAGS_REQUIRED" + } + ], + "header": "tkc/value_desc.h", + "name": "arg_desc_flags_t", + "prefix": "ARG_DESC_FLAGS_", + "level": 1 + }, { "type": "enum", "desc": "style常量定义。", @@ -13414,6 +13338,44 @@ "name": "suggest_words_t", "level": 1 }, + { + "type": "enum", + "desc": "属性描述范围常量定义。", + "consts": [ + { + "desc": "单个对象的属性。", + "name": "PROP_DESC_FLAG_OBJECT" + }, + { + "desc": "同一个类所有实例共享属性。", + "name": "PROP_DESC_FLAG_CLASS" + }, + { + "desc": "全局属性。", + "name": "PROP_DESC_FLAG_GLOBAL" + }, + { + "desc": "可读取。", + "name": "PROP_DESC_FLAG_READABLE," + }, + { + "desc": "可修改。", + "name": "PROP_DESC_FLAG_WRITBALE," + }, + { + "desc": "可配置。", + "name": "PROP_DESC_FLAG_CONFIGURABLE" + }, + { + "desc": "需要持久化。", + "name": "PROP_DESC_FLAG_PERSISTENT" + } + ], + "header": "tkc/value_desc.h", + "name": "prop_desc_flags_t", + "prefix": "PROP_DESC_FLAGS_", + "level": 1 + }, { "type": "class", "methods": [], @@ -18893,6 +18855,68 @@ }, "level": 1 }, + { + "type": "enum", + "desc": "属性描述格式常量定义。", + "consts": [ + { + "desc": "无特殊格式。", + "name": "VALUE_FORMAT_TYPE_NONE" + }, + { + "desc": "16进制格式。", + "name": "VALUE_FORMAT_TYPE_HEX" + }, + { + "desc": "非负格式(用于进一步限制float/double)。", + "name": "VALUE_FORMAT_TYPE_HEX" + }, + { + "desc": "手机号码格式。", + "name": "VALUE_FORMAT_TYPE_PHONE" + }, + { + "desc": "邮件格式。", + "name": "VALUE_FORMAT_TYPE_PHONE" + }, + { + "desc": "ip4地址格式。", + "name": "VALUE_FORMAT_TYPE_IP4_ADDRESS" + }, + { + "desc": "域名格式。", + "name": "VALUE_FORMAT_TYPE_DOMAIN_NAME" + }, + { + "desc": "URL格式。", + "name": "VALUE_FORMAT_TYPE_URL" + }, + { + "desc": "JSON格式。", + "name": "VALUE_FORMAT_TYPE_JSON" + }, + { + "desc": "XML格式。", + "name": "VALUE_FORMAT_TYPE_XML" + }, + { + "desc": "UBJSON格式。", + "name": "VALUE_FORMAT_TYPE_UBJSON" + }, + { + "desc": "JS格式。", + "name": "VALUE_FORMAT_TYPE_JS" + }, + { + "desc": "CSV格式。", + "name": "VALUE_FORMAT_TYPE_CSV" + } + ], + "header": "tkc/value_desc.h", + "name": "value_format_type_t", + "prefix": "VALUE_FORMAT_TYPE_", + "level": 1 + }, { "params": [ { @@ -23802,13853 +23826,72 @@ }, { "type": "enum", - "desc": "编码名称。", + "desc": "属性描述类型常量定义。", "consts": [ { - "desc": "UTF-8。", - "name": "ENCODING_UTF8" + "desc": "有符号8位整数类型。", + "name": "VALUE_DESC_TYPE_INT8" }, { - "desc": "UTF-16。", - "name": "ENCODING_UTF16" + "desc": "无符号8位整数类型。", + "name": "VALUE_DESC_TYPE_UINT8" }, { - "desc": "UTF-32。", - "name": "ENCODING_UTF32" + "desc": "有符号16位整数类型。", + "name": "VALUE_DESC_TYPE_INT16" }, { - "desc": "GBK。", - "name": "ENCODING_GBK" + "desc": "无符号16位整数类型。", + "name": "VALUE_DESC_TYPE_UINT16" }, { - "desc": "BIG5-2003。", - "name": "ENCODING_BIG" + "desc": "有符号32位整数类型。", + "name": "VALUE_DESC_TYPE_INT32" }, { - "desc": "GB_2312-80。", - "name": "ENCODING_GB2312" + "desc": "无符号32位整数类型。", + "name": "VALUE_DESC_TYPE_UINT32" }, { - "desc": "GB18030。", - "name": "ENCODING_GB18030" - } - ], - "header": "charset/encoding.h", - "name": "encoding_name_t", - "prefix": "ENCODING_NAME_", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "encoding_name_t", - "name": "from", - "desc": "源字符串的编码名称。" - }, - { - "type": "const char*", - "name": "from_str", - "desc": "源字符串。" - }, - { - "type": "uint32_t", - "name": "from_size", - "desc": "源字符串的长度。" - }, - { - "type": "encoding_name_t", - "name": "to", - "desc": "目标字符串的编码名称。" - }, - { - "type": "const char*", - "name": "", - "desc": "。" - }, - { - "type": "uint32_t", - "name": "to_size", - "desc": "目标字符串的最大长度。" - } - ], - "annotation": { - "static": true - }, - "desc": "字符集转换。", - "name": "encoding_convert", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "const char*", - "name": "from_str", - "desc": "源字符串(utf8)。" - }, - { - "type": "uint32_t", - "name": "from_size", - "desc": "源字符串的长度。" - }, - { - "type": "const char*", - "name": "to_str", - "desc": "目标字符串(gbk)。" - }, - { - "type": "uint32_t", - "name": "to_size", - "desc": "目标字符串的最大长度。" - } - ], - "annotation": { - "static": true - }, - "desc": "将utf8转换成gbk编码。", - "name": "encoding_utf8_to_gbk", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "const char*", - "name": "from_str", - "desc": "源字符串(gbk)。" - }, - { - "type": "uint32_t", - "name": "from_size", - "desc": "源字符串的长度。" - }, - { - "type": "const char*", - "name": "", - "desc": "。" - }, - { - "type": "uint32_t", - "name": "to_size", - "desc": "目标字符串的最大长度。" - } - ], - "annotation": { - "static": true - }, - "desc": "将gbk转换成utf8编码。", - "name": "encoding_gbk_to_utf8", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [], - "header": "charset/encoding.h", - "desc": "encoding conversion\n\n示例:\n\n```c\n```", - "name": "encoding_t", - "annotation": { - "fake": true - }, - "level": 1 - }, - { - "params": [ - { - "type": "const char*", - "name": "app_name", - "desc": "应用程序名称。" - } - ], - "annotation": { - "global": true - }, - "desc": "初始化应用程序的配置信息。", - "name": "app_conf_init_ini", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - }, - "type": "method", - "header": "conf_io/app_conf_init_ini.h", - "level": 1 - }, - { - "params": [ - { - "type": "const char*", - "name": "app_name", - "desc": "应用程序名称。" - } - ], - "annotation": { - "global": true - }, - "desc": "初始化应用程序的配置信息。", - "name": "app_conf_init_json", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - }, - "type": "method", - "header": "conf_io/app_conf_init_json.h", - "level": 1 - }, - { - "params": [ - { - "type": "const char*", - "name": "app_name", - "desc": "应用程序名称。" - } - ], - "annotation": { - "global": true - }, - "desc": "初始化应用程序的配置信息。", - "name": "app_conf_init_ubjson", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - }, - "type": "method", - "header": "conf_io/app_conf_init_ubjson.h", - "level": 1 - }, - { - "params": [ - { - "type": "conf_loader_t", - "name": "load", - "desc": "配置加载函数。" - }, - { - "type": "const char*", - "name": "app_name", - "desc": "应用程序名称。" - }, - { - "type": "const char*", - "name": "extname", - "desc": "文件扩展名。" - } - ], - "annotation": { - "global": true - }, - "desc": "初始化。", - "name": "app_conf_init", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - }, - "type": "method", - "header": "conf_io/app_conf_init.h", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "object_t*", - "name": "", - "desc": "。" - } - ], - "annotation": { - "static": true - }, - "desc": "设置app_conf实例。", - "name": "app_conf_set_instance", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [], - "annotation": { - "static": true - }, - "desc": "获取app_conf实例。", - "name": "app_conf_get_instance", - "return": { - "type": "object_t*", - "desc": "返回app_conf实例。" - } - }, - { - "params": [], - "annotation": { - "static": true, - "scriptable": true - }, - "desc": "持久保存配置。", - "name": "app_conf_save", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [], - "annotation": { - "static": true, - "scriptable": true - }, - "desc": "重新加载配置(内存中的配置丢失)。", - "name": "app_conf_reload", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "event_func_t", - "name": "on_event", - "desc": "事件处理函数。" - }, - { - "type": "void*", - "name": "ctx", - "desc": "事件处理函数上下文。" - } - ], - "annotation": { - "static": true - }, - "desc": "注册配置变化事件。", - "name": "app_conf_on_changed", - "return": { - "type": "uint32_t", - "desc": "返回id,用于app_conf_off_changed。" - } - }, - { - "params": [ - { - "type": "uint32_t", - "name": "id", - "desc": "app_conf_on_changed返回的ID。" - } - ], - "annotation": { - "static": true - }, - "desc": "注销配置变化事件。", - "name": "app_conf_off_changed", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "void*", - "name": "ctx", - "desc": "事件处理函数上下文。" - } - ], - "annotation": { - "static": true - }, - "desc": "注销配置变化事件。", - "name": "app_conf_off_changed_by_ctx", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [], - "annotation": { - "static": true, - "scriptable": true - }, - "desc": "释放conf对象。", - "name": "app_conf_deinit", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "const char*", - "name": "key", - "desc": "配置项的名称。" - }, - { - "type": "const value_t*", - "name": "v", - "desc": "配置项的值。" - } - ], - "annotation": { - "static": true - }, - "desc": "设置配置项的值。", - "name": "app_conf_set", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "const char*", - "name": "key", - "desc": "配置项的名称。" - }, - { - "type": "value_t*", - "name": "v", - "desc": "配置项的值(用于返回)。" - } - ], - "annotation": { - "static": true - }, - "desc": "获取配置项的值。", - "name": "app_conf_get", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "const char*", - "name": "key", - "desc": "配置项的名称。" - } - ], - "annotation": { - "static": true, - "scriptable": true - }, - "desc": "检查配置项是否存在。", - "name": "app_conf_exist", - "return": { - "type": "bool_t", - "desc": "返回TRUE表示存在,FALSE表示不存在。" - } - }, - { - "params": [ - { - "type": "const char*", - "name": "key", - "desc": "配置项的名称。" - }, - { - "type": "int32_t", - "name": "v", - "desc": "配置项的值。" - } - ], - "annotation": { - "static": true, - "scriptable": true - }, - "desc": "设置整数类型配置项的值。", - "name": "app_conf_set_int", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "const char*", - "name": "key", - "desc": "配置项的名称。" - }, - { - "type": "int64_t", - "name": "v", - "desc": "配置项的值。" - } - ], - "annotation": { - "static": true, - "scriptable": true - }, - "desc": "设置64位整数类型配置项的值。", - "name": "app_conf_set_int64", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "const char*", - "name": "key", - "desc": "配置项的名称。" - }, - { - "type": "bool_t", - "name": "v", - "desc": "配置项的值。" - } - ], - "annotation": { - "static": true, - "scriptable": true - }, - "desc": "设置bool类型配置项的值。", - "name": "app_conf_set_bool", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "const char*", - "name": "key", - "desc": "配置项的名称。" - }, - { - "type": "double", - "name": "v", - "desc": "配置项的值。" - } - ], - "annotation": { - "static": true, - "scriptable": true - }, - "desc": "设置双精度类型配置项的值。", - "name": "app_conf_set_double", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "const char*", - "name": "key", - "desc": "配置项的名称。" - }, - { - "type": "const char*", - "name": "v", - "desc": "配置项的值。" - } - ], - "annotation": { - "static": true, - "scriptable": true - }, - "desc": "设置字符串类型配置项的值。", - "name": "app_conf_set_str", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "const char*", - "name": "key", - "desc": "配置项的名称。" - }, - { - "type": "const wchar_t*", - "name": "v", - "desc": "配置项的值。" - } - ], - "annotation": { - "static": true - }, - "desc": "设置宽字符串类型配置项的值。", - "name": "app_conf_set_wstr", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "const char*", - "name": "key", - "desc": "配置项的名称。" - }, - { - "type": "int32_t", - "name": "defval", - "desc": "缺省值。" - } - ], - "annotation": { - "static": true, - "scriptable": true - }, - "desc": "获取整数类型配置项的值。", - "name": "app_conf_get_int", - "return": { - "type": "int32_t", - "desc": "返回配置项的值(如果不存在返回缺省值)。" - } - }, - { - "params": [ - { - "type": "const char*", - "name": "key", - "desc": "配置项的名称。" - }, - { - "type": "int64_t", - "name": "defval", - "desc": "缺省值。" - } - ], - "annotation": { - "static": true, - "scriptable": true - }, - "desc": "获取64位整数类型配置项的值。", - "name": "app_conf_get_int64", - "return": { - "type": "int64_t", - "desc": "返回配置项的值(如果不存在返回缺省值)。" - } - }, - { - "params": [ - { - "type": "const char*", - "name": "key", - "desc": "配置项的名称。" - }, - { - "type": "bool_t", - "name": "defval", - "desc": "缺省值。" - } - ], - "annotation": { - "static": true, - "scriptable": true - }, - "desc": "获取bool类型配置项的值。", - "name": "app_conf_get_bool", - "return": { - "type": "bool_t", - "desc": "返回配置项的值(如果不存在返回缺省值)。" - } - }, - { - "params": [ - { - "type": "const char*", - "name": "key", - "desc": "配置项的名称。" - }, - { - "type": "double", - "name": "defval", - "desc": "缺省值。" - } - ], - "annotation": { - "static": true, - "scriptable": true - }, - "desc": "获取单精度浮点数类型配置项的值。", - "name": "app_conf_get_double", - "return": { - "type": "double", - "desc": "返回配置项的值(如果不存在返回缺省值)。" - } - }, - { - "params": [ - { - "type": "const char*", - "name": "key", - "desc": "配置项的名称。" - }, - { - "type": "const char*", - "name": "defval", - "desc": "缺省值。" - } - ], - "annotation": { - "static": true, - "scriptable": true - }, - "desc": "获取字符串类型配置项的值。", - "name": "app_conf_get_str", - "return": { - "type": "const char*", - "desc": "返回配置项的值(如果不存在返回缺省值)。" - } - }, - { - "params": [ - { - "type": "const char*", - "name": "key", - "desc": "配置项的名称。" - }, - { - "type": "const wchar_t*", - "name": "str", - "desc": "返回值。" - }, - { - "type": "uint32_t", - "name": "max_size", - "desc": "最大长度(字符数)。" - } - ], - "annotation": { - "static": true - }, - "desc": "获取宽字符串类型配置项的值。", - "name": "app_conf_get_wstr", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "const char*", - "name": "key", - "desc": "配置项的名称。" - } - ], - "annotation": { - "static": true, - "scriptable": true - }, - "desc": "删除配置项。", - "name": "app_conf_remove", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [], - "header": "conf_io/app_conf.h", - "desc": "应用程序的配置信息。\n\n底层实现可以是任何格式,比如INI,XML,JSON和UBJSON。\n\n对于树状的文档,key可以是多级的,用.分隔。如network.ip。\n\nconf-io是可选组件,需要自己包含头文件,否则64位数据类型会被截断成32位的数据。\n\n```c\n#include \"conf_io/app_conf.h\"\n```", - "name": "app_conf_t", - "annotation": { - "fake": true, - "scriptable": true - }, - "level": 1 - }, - { - "params": [ - { - "type": "const char*", - "name": "data", - "desc": "数据。" - } - ], - "annotation": { - "global": true - }, - "desc": "从缓存区加载ini格式的conf doc对象。", - "name": "conf_doc_load_ini", - "return": { - "type": "conf_doc_t*", - "desc": "返回conf_doc对象。" - }, - "type": "method", - "header": "conf_io/conf_ini.h", - "level": 1 - }, - { - "params": [ - { - "type": "conf_doc_t*", - "name": "doc", - "desc": "conf doc对象。" - }, - { - "type": "str_t*", - "name": "str", - "desc": "保存结果。" - } - ], - "annotation": { - "global": true - }, - "desc": "保存conf doc对象为ini格式。", - "name": "conf_doc_save_ini", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败" - }, - "type": "method", - "header": "conf_io/conf_ini.h", - "level": 1 - }, - { - "params": [ - { - "type": "const char*", - "name": "data", - "desc": "JSON数据。" - }, - { - "type": "int32_t", - "name": "size", - "desc": "JSON数据长度。" - } - ], - "annotation": { - "global": true - }, - "desc": "", - "name": "conf_doc_load_json", - "return": { - "type": "conf_doc_t*", - "desc": "返回doc对象。" - }, - "type": "method", - "header": "conf_io/conf_json.h", - "level": 1 - }, - { - "params": [ - { - "type": "conf_doc_t*", - "name": "doc", - "desc": "doc对象。" - }, - { - "type": "str_t*", - "name": "str", - "desc": "保存结果。" - } - ], - "annotation": { - "global": true - }, - "desc": "", - "name": "conf_doc_save_json", - "return": { - "type": "object_t*", - "desc": "返回配置对象。" - }, - "type": "method", - "header": "conf_io/conf_json.h", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "uint32_t", - "name": "prealloc_nodes_nr", - "desc": "预先分配的节点数。" - } - ], - "annotation": {}, - "desc": "构造函数。", - "name": "conf_doc_create", - "return": { - "type": "conf_doc_t*", - "desc": "返回doc对象。" - } - }, - { - "params": [ - { - "type": "conf_doc_t*", - "name": "doc", - "desc": "文档对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "节点名称。" - } - ], - "annotation": {}, - "desc": "创建一个空节点。", - "name": "conf_doc_create_node", - "return": { - "type": "conf_node_t*", - "desc": "返回节点对象。" - } - }, - { - "params": [ - { - "type": "conf_doc_t*", - "name": "doc", - "desc": "文档对象。" - }, - { - "type": "conf_node_t*", - "name": "node", - "desc": "节点对象。" - } - ], - "annotation": {}, - "desc": "销毁节点对象。", - "name": "conf_doc_destroy_node", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "conf_doc_t*", - "name": "doc", - "desc": "文档对象。" - }, - { - "type": "conf_node_t*", - "name": "node", - "desc": "节点对象。" - }, - { - "type": "conf_node_t*", - "name": "sibling", - "desc": "待追加节点对象。" - } - ], - "annotation": {}, - "desc": "追加一个兄弟节点。", - "name": "conf_doc_append_sibling", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "conf_doc_t*", - "name": "doc", - "desc": "文档对象。" - }, - { - "type": "conf_node_t*", - "name": "node", - "desc": "节点对象。" - }, - { - "type": "conf_node_t*", - "name": "child", - "desc": "待追加节点对象。" - } - ], - "annotation": {}, - "desc": "追加一个子节点。", - "name": "conf_doc_append_child", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "conf_doc_t*", - "name": "doc", - "desc": "文档对象。" - }, - { - "type": "conf_node_t*", - "name": "node", - "desc": "节点对象。" - }, - { - "type": "conf_node_t*", - "name": "sibling", - "desc": "待删除节点对象。" - } - ], - "annotation": {}, - "desc": "删除指定的兄弟节点。", - "name": "conf_doc_remove_sibling", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "conf_doc_t*", - "name": "doc", - "desc": "文档对象。" - }, - { - "type": "conf_node_t*", - "name": "node", - "desc": "节点对象。" - }, - { - "type": "conf_node_t*", - "name": "child", - "desc": "待删除节点对象。" - } - ], - "annotation": {}, - "desc": "删除指定的子节点。", - "name": "conf_doc_remove_child", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "conf_doc_t*", - "name": "doc", - "desc": "文档对象。" - }, - { - "type": "conf_node_t*", - "name": "node", - "desc": "节点对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "待删除节点的名称。" - } - ], - "annotation": {}, - "desc": "删除指定的子节点。", - "name": "conf_doc_remove_child_by_name", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "conf_doc_t*", - "name": "doc", - "desc": "文档对象。" - }, - { - "type": "conf_node_t*", - "name": "node", - "desc": "节点对象。" - } - ], - "annotation": {}, - "desc": "删除全部子节点。", - "name": "conf_doc_remove_children", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "conf_doc_t*", - "name": "doc", - "desc": "文档对象。" - }, - { - "type": "const char*", - "name": "path", - "desc": "节点的路径。" - }, - { - "type": "const value_t*", - "name": "v", - "desc": "值。" - } - ], - "annotation": {}, - "desc": "设置指定路径节点的值。", - "name": "conf_doc_set", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "conf_doc_t*", - "name": "doc", - "desc": "文档对象。" - }, - { - "type": "const char*", - "name": "path", - "desc": "节点的路径。" - }, - { - "type": "int32_t", - "name": "v", - "desc": "值。" - } - ], - "annotation": {}, - "desc": "设置指定路径节点的值。", - "name": "conf_doc_set_int", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "conf_doc_t*", - "name": "doc", - "desc": "文档对象。" - }, - { - "type": "const char*", - "name": "path", - "desc": "节点的路径。" - }, - { - "type": "bool_t", - "name": "v", - "desc": "值。" - } - ], - "annotation": {}, - "desc": "设置指定路径节点的值。", - "name": "conf_doc_set_bool", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "conf_doc_t*", - "name": "doc", - "desc": "文档对象。" - }, - { - "type": "const char*", - "name": "path", - "desc": "节点的路径。" - }, - { - "type": "float", - "name": "v", - "desc": "值。" - } - ], - "annotation": {}, - "desc": "设置指定路径节点的值。", - "name": "conf_doc_set_float", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "conf_doc_t*", - "name": "doc", - "desc": "文档对象。" - }, - { - "type": "const char*", - "name": "path", - "desc": "节点的路径。" - }, - { - "type": "const char*", - "name": "v", - "desc": "值。" - } - ], - "annotation": {}, - "desc": "设置指定路径节点的值。", - "name": "conf_doc_set_str", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "conf_doc_t*", - "name": "doc", - "desc": "文档对象。" - }, - { - "type": "const char*", - "name": "path", - "desc": "节点的路径。" - }, - { - "type": "value_t*", - "name": "v", - "desc": "用于返回值。" - } - ], - "annotation": {}, - "desc": "获取指定路径节点的值。", - "name": "conf_doc_get", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "conf_doc_t*", - "name": "doc", - "desc": "文档对象。" - }, - { - "type": "const char*", - "name": "path", - "desc": "节点的路径。" - }, - { - "type": "int32_t", - "name": "defval", - "desc": "缺省值。" - } - ], - "annotation": {}, - "desc": "获取指定路径节点的值。", - "name": "conf_doc_get_int", - "return": { - "type": "int32_t", - "desc": "返回值。" - } - }, - { - "params": [ - { - "type": "conf_doc_t*", - "name": "doc", - "desc": "文档对象。" - }, - { - "type": "const char*", - "name": "path", - "desc": "节点的路径。" - }, - { - "type": "bool_t", - "name": "defval", - "desc": "缺省值。" - } - ], - "annotation": {}, - "desc": "获取指定路径节点的值。", - "name": "conf_doc_get_bool", - "return": { - "type": "bool_t", - "desc": "返回值。" - } - }, - { - "params": [ - { - "type": "conf_doc_t*", - "name": "doc", - "desc": "文档对象。" - }, - { - "type": "const char*", - "name": "path", - "desc": "节点的路径。" - }, - { - "type": "float", - "name": "defval", - "desc": "缺省值。" - } - ], - "annotation": {}, - "desc": "获取指定路径节点的值。", - "name": "conf_doc_get_float", - "return": { - "type": "float", - "desc": "返回值。" - } - }, - { - "params": [ - { - "type": "conf_doc_t*", - "name": "doc", - "desc": "文档对象。" - }, - { - "type": "const char*", - "name": "path", - "desc": "节点的路径。" - }, - { - "type": "const char*", - "name": "defval", - "desc": "缺省值。" - } - ], - "annotation": {}, - "desc": "获取指定路径节点的值。", - "name": "conf_doc_get_str", - "return": { - "type": "const char*", - "desc": "返回值。" - } - }, - { - "params": [ - { - "type": "conf_doc_t*", - "name": "doc", - "desc": "文档对象。" - }, - { - "type": "const char*", - "name": "path", - "desc": "节点的路径。" - } - ], - "annotation": {}, - "desc": "删除指定路径的节点。", - "name": "conf_doc_remove", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "conf_doc_t*", - "name": "doc", - "desc": "文档对象。" - }, - { - "type": "const char*", - "name": "path", - "desc": "节点的路径。" - } - ], - "annotation": {}, - "desc": "删除指定路径的节点的全部子节点。", - "name": "conf_doc_clear", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "conf_doc_t*", - "name": "doc", - "desc": "文档对象。" - }, - { - "type": "const char*", - "name": "path", - "desc": "节点的路径。" - } - ], - "annotation": {}, - "desc": "和前一个兄弟节点交换位置。", - "name": "conf_doc_move_up", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "conf_doc_t*", - "name": "doc", - "desc": "文档对象。" - }, - { - "type": "const char*", - "name": "path", - "desc": "节点的路径。" - } - ], - "annotation": {}, - "desc": "和后一个兄弟节点交换位置。", - "name": "conf_doc_move_down", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "conf_doc_t*", - "name": "doc", - "desc": "文档对象。" - }, - { - "type": "const char*", - "name": "path", - "desc": "节点的路径。" - } - ], - "annotation": {}, - "desc": "判断指定路径的节点是否存在。", - "name": "conf_doc_exists", - "return": { - "type": "bool_t", - "desc": "返回TRUE表示成功,FALSE表示失败。" - } - }, - { - "params": [ - { - "type": "conf_doc_t*", - "name": "doc", - "desc": "文档对象。" - }, - { - "type": "const char*", - "name": "path", - "desc": "节点的路径。" - } - ], - "annotation": {}, - "desc": "检查指定节点是否在兄弟节点中排第一。", - "name": "conf_doc_is_first", - "return": { - "type": "bool_t", - "desc": "返回TRUE表示是,否则表示不是。" - } - }, - { - "params": [ - { - "type": "conf_doc_t*", - "name": "doc", - "desc": "文档对象。" - }, - { - "type": "const char*", - "name": "path", - "desc": "节点的路径。" - } - ], - "annotation": {}, - "desc": "检查指定节点是否在兄弟节点中排最后。", - "name": "conf_doc_is_last", - "return": { - "type": "bool_t", - "desc": "返回TRUE表示是,否则表示不是。" - } - }, - { - "params": [ - { - "type": "conf_doc_t*", - "name": "doc", - "desc": "文档对象。" - }, - { - "type": "const char*", - "name": "path", - "desc": "节点的路径。" - } - ], - "annotation": {}, - "desc": "追加一个子节点。", - "name": "conf_doc_add_child", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "conf_doc_t*", - "name": "doc", - "desc": "文档对象。" - } - ], - "annotation": {}, - "desc": "析构函数。", - "name": "conf_doc_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [ - { - "name": "root", - "desc": "根节点。", - "type": "conf_node_t*" - } - ], - "header": "conf_io/conf_node.h", - "desc": "代表整个配置文件。", - "name": "conf_doc_t", - "level": 1 - }, - { - "type": "enum", - "desc": "节点类型。", - "consts": [ - { - "desc": "无效节点。", - "name": "CONF_NODE_NONE" - }, - { - "desc": "对象节点。", - "name": "CONF_NODE_OBJECT" - }, - { - "desc": "数组节点。", - "name": "CONF_NODE_ARRAY" - }, - { - "desc": "简单节点。", - "name": "CONF_NODE_SIMPLE" - } - ], - "header": "conf_io/conf_node.h", - "name": "conf_node_type_t", - "prefix": "CONF_NODE_", - "level": 1 - }, - { - "type": "enum", - "desc": "节点值得类型。", - "consts": [ - { - "desc": "无效类型。", - "name": "CONF_NODE_VALUE_NONE" - }, - { - "desc": "bool_t类型。", - "name": "CONF_NODE_VALUE_BOOL" - }, - { - "desc": "int8_t类型。", - "name": "CONF_NODE_VALUE_INT8" - }, - { - "desc": "uint8_t类型。", - "name": "CONF_NODE_VALUE_UINT8" - }, - { - "desc": "int16_t类型。", - "name": "CONF_NODE_VALUE_INT16" - }, - { - "desc": "uint16_t类型。", - "name": "CONF_NODE_VALUE_UINT16" - }, - { - "desc": "int32_t类型。", - "name": "CONF_NODE_VALUE_INT32" - }, - { - "desc": "uint32_t类型。", - "name": "CONF_NODE_VALUE_UINT32" + "desc": "有符号64位整数类型。", + "name": "VALUE_DESC_TYPE_INT64" }, { - "desc": "int64_t类型。", - "name": "CONF_NODE_VALUE_INT64" + "desc": "无符号64位整数类型。", + "name": "VALUE_DESC_TYPE_UINT64" }, { - "desc": "uint64_t类型。", - "name": "CONF_NODE_VALUE_UINT64" + "desc": "单精度浮点数类型。", + "name": "VALUE_DESC_TYPE_FLOAT" }, { - "desc": "float类型。", - "name": "CONF_NODE_VALUE_FLOAT32" + "desc": "双精度浮点数类型。", + "name": "VALUE_DESC_TYPE_DOUBLE" }, { - "desc": "double类型。", - "name": "CONF_NODE_VALUE_DOUBLE" + "desc": "布尔类型。", + "name": "VALUE_DESC_TYPE_BOOL" }, { "desc": "字符串类型。", - "name": "CONF_NODE_VALUE_STRING" + "name": "VALUE_DESC_TYPE_STRING" }, { - "desc": "短字符(len<=7)串类型。", - "name": "CONF_NODE_VALUE_SMALL_STR" + "desc": "二进制类型。", + "name": "VALUE_DESC_TYPE_BINARY" }, { - "desc": "节点类型。", - "name": "CONF_NODE_VALUE_NODE" - } - ], - "header": "conf_io/conf_node.h", - "name": "conf_node_value_t", - "prefix": "CONF_NODE_VALUE_", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "conf_node_t*", - "name": "node", - "desc": "节点对象。" - } - ], - "annotation": {}, - "desc": "获得节点的名称。", - "name": "conf_node_get_name", - "return": { - "type": "const char*", - "desc": "返回节点名称。" - } - }, - { - "params": [ - { - "type": "conf_node_t*", - "name": "node", - "desc": "节点对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "节点名称。" - } - ], - "annotation": {}, - "desc": "查找指定名称的子节点。", - "name": "conf_node_find_child", - "return": { - "type": "conf_node_t*", - "desc": "返回节点对象。" - } - }, - { - "params": [ - { - "type": "conf_node_t*", - "name": "node", - "desc": "节点对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "节点名称。" - } - ], - "annotation": {}, - "desc": "查找指定名称的兄弟节点。", - "name": "conf_node_find_sibling", - "return": { - "type": "conf_node_t*", - "desc": "返回节点对象。" - } - }, - { - "params": [ - { - "type": "conf_node_t*", - "name": "node", - "desc": "节点对象。" - }, - { - "type": "const value_t*", - "name": "v", - "desc": "值。" - } - ], - "annotation": {}, - "desc": "设置节点的值。", - "name": "conf_node_set_value", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "conf_node_t*", - "name": "node", - "desc": "节点对象。" - }, - { - "type": "value_t*", - "name": "v", - "desc": "值(返回)。" - } - ], - "annotation": {}, - "desc": "设置节点的值。", - "name": "conf_node_get_value", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "conf_node_t*", - "name": "node", - "desc": "节点对象。" - } - ], - "annotation": {}, - "desc": "获取第一个子节点。", - "name": "conf_node_get_first_child", - "return": { - "type": "conf_node_t*", - "desc": "返回第一个子节点。" - } - }, - { - "params": [ - { - "type": "conf_node_t*", - "name": "node", - "desc": "节点对象。" - }, - { - "type": "conf_node_t*", - "name": "child", - "desc": "子节点对象。" - } - ], - "annotation": {}, - "desc": "设置第一个子节点。", - "name": "conf_node_set_first_child", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [ - { - "name": "next", - "desc": "下一个兄弟节点。", - "type": "conf_node_t*" - }, - { - "name": "parent", - "desc": "父节点。", - "type": "conf_node_t*" - }, - { - "name": "value_type", - "desc": "值的类型。", - "type": "uint8_t" - }, - { - "name": "node_type", - "desc": "节点类型。", - "type": "uint8_t" - } - ], - "header": "conf_io/conf_node.h", - "desc": "节点。", - "name": "conf_node_t", - "level": 1 - }, - { - "params": [ - { - "type": "const void*", - "name": "data", - "desc": "数据。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "数据长度。" - } - ], - "annotation": { - "global": true - }, - "desc": "从缓存区加载ubjson格式的conf doc对象。", - "name": "conf_doc_load_ubjson", - "return": { - "type": "conf_doc_t*", - "desc": "返回conf_doc对象。" - }, - "type": "method", - "header": "conf_io/conf_ubjson.h", - "level": 1 - }, - { - "params": [ - { - "type": "conf_doc_t*", - "name": "doc", - "desc": "conf doc对象。" - }, - { - "type": "ubjson_writer_t*", - "name": "writer", - "desc": "ubjson writer对象。" - } - ], - "annotation": { - "global": true - }, - "desc": "保存conf doc对象为ubjson格式。", - "name": "conf_doc_save_ubjson", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败" - }, - "type": "method", - "header": "conf_io/conf_ubjson.h", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "object_t*", - "name": "args", - "desc": "参数。" - } - ], - "annotation": { - "constructor": true - }, - "desc": "创建缺省的对话框高亮策略。", - "name": "dialog_highlighter_default_create", - "return": { - "type": "dialog_highlighter_t*", - "desc": "返回对话框高亮策略对象。" - } - } - ], - "events": [], - "properties": [ - { - "name": "start_alpha", - "desc": "起始alpha,打开对话框的动画开始时的alpha值。", - "type": "uint8_t" - }, - { - "name": "end_alpha", - "desc": "结束alpha,打开对话框的动画结束(直到对话框被关闭)时的alpha值。", - "type": "uint8_t" - }, - { - "name": "system_bar_alpha", - "desc": "由于在没有过度动画的情况下,截图中已经包括黑色色块,为了让 system_bar 也同步高亮部分的色块透明。", - "type": "uint8_t" - } - ], - "header": "dialog_highlighters/dialog_highlighter_default.h", - "desc": "缺省对话框高亮策略。\n\n>本策略在背景上画一层半透明的蒙版来高亮(突出)对话框本身。\n>对于性能不高的平台,建议将start\\_alpha和end\\_alpha设为相同。", - "name": "dialog_highlighter_default_t", - "level": 1 - }, - { - "params": [], - "annotation": { - "global": true - }, - "desc": "", - "name": "SDL_ShowCursor", - "type": "method", - "header": "src/dllexports.h", - "level": 1 - }, - { - "params": [], - "annotation": { - "global": true - }, - "desc": "", - "name": "SDL_WarpMouseInWindow", - "type": "method", - "header": "src/dllexports.h", - "level": 1 - }, - { - "params": [], - "annotation": { - "global": true - }, - "desc": "", - "name": "SDL_GetDefaultCursor", - "type": "method", - "header": "src/dllexports.h", - "level": 1 - }, - { - "params": [], - "annotation": { - "global": true - }, - "desc": "", - "name": "SDL_SetCursor", - "type": "method", - "header": "src/dllexports.h", - "level": 1 - }, - { - "params": [], - "annotation": { - "global": true - }, - "desc": "", - "name": "SDL_FreeCursor", - "type": "method", - "header": "src/dllexports.h", - "level": 1 - }, - { - "params": [], - "annotation": { - "global": true - }, - "desc": "", - "name": "SDL_CreateSystemCursor", - "type": "method", - "header": "src/dllexports.h", - "level": 1 - }, - { - "params": [], - "annotation": { - "global": true - }, - "desc": "", - "name": "SDL_GetMouseFocus", - "type": "method", - "header": "src/dllexports.h", - "level": 1 - }, - { - "params": [], - "annotation": { - "global": true - }, - "desc": "", - "name": "SDL_MixAudioFormat", - "type": "method", - "header": "src/dllexports.h", - "level": 1 - }, - { - "params": [], - "annotation": { - "global": true - }, - "desc": "", - "name": "SDL_DequeueAudio", - "type": "method", - "header": "src/dllexports.h", - "level": 1 - }, - { - "params": [], - "annotation": { - "global": true - }, - "desc": "", - "name": "SDL_QueueAudio", - "type": "method", - "header": "src/dllexports.h", - "level": 1 - }, - { - "params": [], - "annotation": { - "global": true - }, - "desc": "", - "name": "SDL_GetQueuedAudioSize", - "type": "method", - "header": "src/dllexports.h", - "level": 1 - }, - { - "params": [], - "annotation": { - "global": true - }, - "desc": "", - "name": "SDL_ClearQueuedAudio", - "type": "method", - "header": "src/dllexports.h", - "level": 1 - }, - { - "params": [], - "annotation": { - "global": true - }, - "desc": "", - "name": "SDL_PauseAudioDevice", - "type": "method", - "header": "src/dllexports.h", - "level": 1 - }, - { - "params": [], - "annotation": { - "global": true - }, - "desc": "", - "name": "SDL_CloseAudioDevice", - "type": "method", - "header": "src/dllexports.h", - "level": 1 - }, - { - "params": [], - "annotation": { - "global": true - }, - "desc": "", - "name": "SDL_OpenAudioDevice", - "type": "method", - "header": "src/dllexports.h", - "level": 1 - }, - { - "params": [], - "annotation": { - "global": true - }, - "desc": "", - "name": "SDL_WasInit", - "type": "method", - "header": "src/dllexports.h", - "level": 1 - }, - { - "params": [], - "annotation": { - "global": true - }, - "desc": "", - "name": "SDL_Init", - "type": "method", - "header": "src/dllexports.h", - "level": 1 - }, - { - "params": [], - "annotation": { - "global": true - }, - "desc": "", - "name": "SDL_GetError", - "type": "method", - "header": "src/dllexports.h", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [], - "annotation": { - "static": true - }, - "desc": "初始化AWTK扩展控件。", - "name": "tk_ext_widgets_init", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [], - "header": "ext_widgets/ext_widgets.h", - "desc": "", - "name": "tk_ext_widgets_t", - "level": 1 - }, - { - "type": "class", - "methods": [], - "events": [], - "properties": [ - { - "name": "name", - "desc": "名称。", - "type": "char*", - "annotation": { - "readable": true - } - }, - { - "name": "is_dir", - "desc": "是否是目录。", - "type": "bool_t", - "annotation": { - "readable": true - } - }, - { - "name": "is_reg_file", - "desc": "是否是常规文件。", - "type": "bool_t", - "annotation": { - "readable": true - } - }, - { - "name": "size", - "desc": "文件大小。", - "type": "uint64_t", - "annotation": { - "readable": true - } - }, - { - "name": "atime", - "desc": "最后一次访问时间。", - "type": "uint64_t", - "annotation": { - "readable": true - } - }, - { - "name": "mtime", - "desc": "最后修改时间。", - "type": "uint64_t", - "annotation": { - "readable": true - } - }, - { - "name": "ctime", - "desc": "创建时间。", - "type": "uint64_t", - "annotation": { - "readable": true - } - } - ], - "header": "file_browser/file_browser.h", - "desc": "文件或目录的信息。", - "name": "fb_item_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [], - "annotation": { - "constructor": true - }, - "desc": "创建file_browser对象", - "name": "file_browser_create", - "return": { - "type": "file_browser_t*", - "desc": "对象。" - } - }, - { - "params": [ - { - "type": "file_browser_t*", - "name": "fb", - "desc": "file browser对象。" - }, - { - "type": "const char*", - "name": "cwd", - "desc": "当前目录。" - } - ], - "annotation": {}, - "desc": "设置当前目录。", - "name": "file_browser_set_cwd", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "file_browser_t*", - "name": "fb", - "desc": "file browser对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "当前目录下的子目录名。" - } - ], - "annotation": {}, - "desc": "在当前目录下创建指定子目录。", - "name": "file_browser_create_dir", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "file_browser_t*", - "name": "fb", - "desc": "file browser对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "当前目录下的文件名。" - }, - { - "type": "const void*", - "name": "buff", - "desc": "文件内容。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "文件内容的长度。" - } - ], - "annotation": {}, - "desc": "在当前目录下创建指定文件。", - "name": "file_browser_create_file", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "file_browser_t*", - "name": "fb", - "desc": "file browser对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "当前目录下的子目录名/文件名。" - } - ], - "annotation": {}, - "desc": "删除当前目录下的指定子目录或文件。", - "name": "file_browser_remove", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "file_browser_t*", - "name": "fb", - "desc": "file browser对象。" - }, - { - "type": "const char*", - "name": "dir", - "desc": "当前目录下的子目录名。" - } - ], - "annotation": {}, - "desc": "进入当前目录下的指定子目录。", - "name": "file_browser_enter", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "file_browser_t*", - "name": "fb", - "desc": "file browser对象。" - } - ], - "annotation": {}, - "desc": "返回上一级目录。", - "name": "file_browser_up", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "file_browser_t*", - "name": "fb", - "desc": "file browser对象。" - } - ], - "annotation": {}, - "desc": "刷新。", - "name": "file_browser_refresh", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "file_browser_t*", - "name": "fb", - "desc": "file browser对象。" - }, - { - "type": "tk_filter_t", - "name": "filter", - "desc": "过滤函数。" - }, - { - "type": "void*", - "name": "ctx", - "desc": "过滤函数的上下文。" - } - ], - "annotation": {}, - "desc": "设置过滤函数。", - "name": "file_browser_set_filter", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "file_browser_t*", - "name": "fb", - "desc": "file browser对象。" - }, - { - "type": "tk_compare_t", - "name": "compare", - "desc": "排序用的比较函数。" - } - ], - "annotation": {}, - "desc": "设置排序用的比较函数。", - "name": "file_browser_set_compare", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "file_browser_t*", - "name": "fb", - "desc": "file browser对象。" - }, - { - "type": "bool_t", - "name": "ascending", - "desc": "按升序排。" - } - ], - "annotation": {}, - "desc": "按名称排序。", - "name": "file_browser_sort_by_name", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "file_browser_t*", - "name": "fb", - "desc": "file browser对象。" - }, - { - "type": "bool_t", - "name": "ascending", - "desc": "按升序排。" - } - ], - "annotation": {}, - "desc": "按类型排序。", - "name": "file_browser_sort_by_type", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "file_browser_t*", - "name": "fb", - "desc": "file browser对象。" - }, - { - "type": "bool_t", - "name": "ascending", - "desc": "按升序排。" - } - ], - "annotation": {}, - "desc": "按大小排序。", - "name": "file_browser_sort_by_size", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "file_browser_t*", - "name": "fb", - "desc": "file browser对象。" - }, - { - "type": "bool_t", - "name": "ascending", - "desc": "按升序排。" - } - ], - "annotation": {}, - "desc": "按修改时间排序。", - "name": "file_browser_sort_by_mtime", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "file_browser_t*", - "name": "fb", - "desc": "file browser对象。" - } - ], - "annotation": {}, - "desc": "获取当前目录下文件项个数。", - "name": "file_browser_get_items_nr", - "return": { - "type": "uint32_t", - "desc": "返回当前目录下文件项个数。" - } - }, - { - "params": [ - { - "type": "file_browser_t*", - "name": "fb", - "desc": "file browser对象。" - }, - { - "type": "uint32_t", - "name": "index", - "desc": "序数。" - } - ], - "annotation": {}, - "desc": "获取指定项序数的项目。", - "name": "file_browser_get_item", - "return": { - "type": "fb_item_t*", - "desc": "返回指定项序数的项目。" - } - }, - { - "params": [ - { - "type": "file_browser_t*", - "name": "fb", - "desc": "file browser对象。" - }, - { - "type": "bool_t", - "name": "ignore_hidden_files", - "desc": "是否忽略隐藏文件。" - } - ], - "annotation": {}, - "desc": "设置是否忽略隐藏文件。", - "name": "file_browser_set_ignore_hidden_files", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "file_browser_t*", - "name": "fb", - "desc": "file browser对象。" - } - ], - "annotation": {}, - "desc": "销毁file_browser对象", - "name": "file_browser_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [ - { - "name": "cwd", - "desc": "当前路径。", - "type": "char*", - "annotation": { - "readable": true - } - } - ], - "header": "file_browser/file_browser.h", - "desc": "文件浏览器模型。", - "name": "file_browser_t", - "level": 1 - }, - { - "type": "enum", - "desc": "指示器默认绘制的类型。", - "consts": [ - { - "desc": "自动选择。", - "name": "INDICATOR_DEFAULT_PAINT_AUTO" - }, - { - "desc": "实心圆点指示器,当前项填充selected_fg_color,其他填充fg_color。", - "name": "INDICATOR_DEFAULT_PAINT_FILL_DOT" - }, - { - "desc": "镂空圆点指示器,当前项填充selected_fg_color,其他镂空fg_color。", - "name": "INDICATOR_DEFAULT_PAINT_STROKE_DOT" - }, - { - "desc": "实心矩形指示器,当前项填充selected_fg_color,其他填充fg_color。", - "name": "INDICATOR_DEFAULT_PAINT_FILL_RECT" - }, - { - "desc": "镂空矩形指示器,当前项填充selected_fg_color,其他镂空fg_color。", - "name": "INDICATOR_DEFAULT_PAINT_STROKE_RECT" - } - ], - "header": "slide_view/slide_indicator.h", - "name": "indicator_default_paint_t", - "prefix": "INDICATOR_DEFAULT_PAINT_", - "annotation": { - "scriptable": true - }, - "level": 1 - }, - { - "type": "enum", - "desc": "缓存不够时丢弃数据的策略。", - "consts": [ - { - "desc": "丢弃旧的数据。", - "name": "DATA_DISCARD_OLD" - }, - { - "desc": "丢弃新的数据。", - "name": "DATA_DISCARD_NEW" - } - ], - "header": "misc/ostream_retry.h", - "name": "data_discard_policy_t", - "prefix": "DATA_DISCARD_", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "int", - "name": "fd", - "desc": "fd." - } - ], - "annotation": {}, - "desc": "创建ostream对象。", - "name": "tk_ostream_serial_create", - "return": { - "type": "tk_ostream_t*", - "desc": "返回ostream对象。" - } - } - ], - "events": [], - "properties": [], - "header": "serial/ostream_serial.h", - "desc": "基于串口实现的输出流。\n\ninput stream base on fd", - "name": "tk_ostream_serial_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "uint32_t*", - "name": "data", - "desc": "bsvg数据。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "bsvg数据长度。" - }, - { - "type": "str_t*", - "name": "str", - "desc": "用于返回svg数据。" - } - ], - "annotation": {}, - "desc": "bsvg to svg", - "name": "bsvg_to_svg", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "const char*", - "name": "xml", - "desc": "svg数据。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "svg数据长度。" - }, - { - "type": "uint32_t*", - "name": "out", - "desc": "用于返回bsvg数据。" - }, - { - "type": "uint32_t*", - "name": "out_size", - "desc": "bsvg数据长度。" - } - ], - "annotation": {}, - "desc": "svg to bsvg", - "name": "svg_to_bsvg", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "uint32_t", - "name": "capacity", - "desc": "action的容量。" - } - ], - "annotation": { - "constructor": true - }, - "desc": "创建action_queue对象。", - "name": "action_queue_create", - "return": { - "type": "action_queue_t*", - "desc": "action_queue对象。" - } - }, - { - "params": [ - { - "type": "action_queue_t*", - "name": "q", - "desc": "action_queue对象。" - }, - { - "type": "qaction_t**", - "name": "action", - "desc": "用于返回action对象。" - } - ], - "annotation": {}, - "desc": "接收一个请求。", - "name": "action_queue_recv", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "action_queue_t*", - "name": "q", - "desc": "action_queue对象。" - }, - { - "type": "qaction_t*", - "name": "action", - "desc": "action对象。" - } - ], - "annotation": {}, - "desc": "发送一个请求。", - "name": "action_queue_send", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "action_queue_t*", - "name": "q", - "desc": "action_queue对象。" - } - ], - "annotation": {}, - "desc": "销毁。", - "name": "action_queue_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [], - "header": "svg/bsvg_to_svg.h", - "desc": "", - "name": "svg_helper_t", - "annotation": { - "fake": true - }, - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "bsvg_t*", - "name": "", - "desc": "。" - }, - { - "type": "const uint32_t*", - "name": "data", - "desc": "svg数据。" - }, - { - "type": "size", - "name": "size", - "desc": "data长度。" - } - ], - "annotation": {}, - "desc": "初始化bsvg对象。", - "name": "bsvg_init", - "return": { - "type": "bsvg_t*", - "desc": "返回解析后的svg。" - } - } - ], - "events": [], - "properties": [], - "header": "svg/bsvg.h", - "desc": "SVG的二进制格式。", - "name": "bsvg_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "uint16_t", - "name": "max_thread_nr", - "desc": "最大线程数。" - }, - { - "type": "uint16_t", - "name": "min_idle_nr", - "desc": "最小空闲线程数。" - } - ], - "annotation": { - "constructor": true - }, - "desc": "创建action_thread_pool对象。", - "name": "action_thread_pool_create", - "return": { - "type": "action_thread_pool_t*", - "desc": "action_thread_pool对象。" - } - }, - { - "params": [ - { - "type": "action_thread_pool_t*", - "name": "thread_pool", - "desc": "action_thread_pool对象。" - }, - { - "type": "qaction_t*", - "name": "action", - "desc": "action对象。" - } - ], - "annotation": {}, - "desc": "执行action。", - "name": "action_thread_pool_exec", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "action_thread_pool_t*", - "name": "thread_pool", - "desc": "action_thread_pool对象。" - } - ], - "annotation": {}, - "desc": "销毁。", - "name": "action_thread_pool_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [ - { - "name": "max_thread_nr", - "desc": "最大线程数。", - "type": "uint32_t", - "annotation": { - "readable": true - } - }, - { - "name": "min_idle_nr", - "desc": "最小空闲线程数", - "type": "uint32_t", - "annotation": { - "readable": true - } - } - ], - "header": "tkc/action_thread_pool.h", - "desc": "action线程池。", - "name": "action_thread_pool_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [], - "annotation": { - "constructor": true - }, - "desc": "创建action_thread对象。", - "name": "action_thread_create", - "return": { - "type": "action_thread_t*", - "desc": "action_thread对象。" - } - }, - { - "params": [ - { - "type": "waitable_action_queue_t*", - "name": "queue", - "desc": "queue对象。" - } - ], - "annotation": { - "constructor": true - }, - "desc": "创建action_thread对象。", - "name": "action_thread_create_with_queue", - "return": { - "type": "action_thread_t*", - "desc": "action_thread对象。" - } - }, - { - "params": [ - { - "type": "action_thread_t*", - "name": "thread", - "desc": "action_thread对象。" - }, - { - "type": "qaction_t*", - "name": "action", - "desc": "action对象。" - } - ], - "annotation": {}, - "desc": "让线程执行action。", - "name": "action_thread_exec", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "action_thread_t*", - "name": "thread", - "desc": "action_thread对象。" - }, - { - "type": "action_thread_on_idle_t", - "name": "on_idle", - "desc": "空闲时的回调函数。" - }, - { - "type": "void*", - "name": "ctx", - "desc": "回调函数的上下文。" - } - ], - "annotation": {}, - "desc": "设置空闲时的回调函数。", - "name": "action_thread_set_on_idle", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "action_thread_t*", - "name": "thread", - "desc": "action_thread对象。" - }, - { - "type": "action_thread_on_quit_t", - "name": "on_quit", - "desc": "退出时的回调函数。" - }, - { - "type": "void*", - "name": "ctx", - "desc": "回调函数的上下文。" - } - ], - "annotation": {}, - "desc": "设置退出时的回调函数。", - "name": "action_thread_set_on_quit", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "action_thread_t*", - "name": "thread", - "desc": "action_thread对象。" - } - ], - "annotation": {}, - "desc": "销毁。", - "name": "action_thread_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [ - { - "name": "thread", - "desc": "线程对象。", - "type": "tk_thread_t*", - "annotation": { - "readable": true - } - }, - { - "name": "queue", - "desc": "action queue。", - "type": "waitable_action_queue_t*", - "annotation": { - "readable": true - } - }, - { - "name": "executed_actions_nr", - "desc": "已经执行action的个数。", - "type": "uint32_t", - "annotation": { - "readable": true - } - } - ], - "header": "tkc/action_thread.h", - "desc": "执行action的线程。\n\n> 每个线程都有一个action queue,可以是共享的queue,也可以是私有的queue。", - "name": "action_thread_t", - "level": 1 - }, - { - "type": "enum", - "desc": "资源类型常量定义。", - "consts": [ - { - "desc": "无效资源。", - "name": "ASSET_TYPE_NONE" - }, - { - "desc": "字体资源。", - "name": "ASSET_TYPE_FONT" - }, - { - "desc": "图片资源。", - "name": "ASSET_TYPE_IMAGE" - }, - { - "desc": "主题资源。", - "name": "ASSET_TYPE_STYLE" - }, - { - "desc": "UI数据资源。", - "name": "ASSET_TYPE_UI" - }, - { - "desc": "XML数据资源。", - "name": "ASSET_TYPE_XML" - }, - { - "desc": "字符串数据资源。", - "name": "ASSET_TYPE_STRINGS" - }, - { - "desc": "JS等脚本资源。", - "name": "ASSET_TYPE_SCRIPT" - }, - { - "desc": "流图资源。", - "name": "ASSET_TYPE_FLOW" - }, - { - "desc": "其它数据资源。", - "name": "ASSET_TYPE_DATA" - } - ], - "header": "tkc/asset_info.h", - "name": "asset_type_t", - "prefix": "ASSET_TYPE_", - "annotation": { - "scriptable": true - }, - "level": 1 - }, - { - "type": "enum", - "desc": "字体资源类型定义。", - "consts": [ - { - "desc": "无效字体。", - "name": "ASSET_TYPE_FONT_NONE" - }, - { - "desc": "TTF字体。", - "name": "ASSET_TYPE_FONT_TTF" - }, - { - "desc": "位图字体。", - "name": "ASSET_TYPE_FONT_BMP" - } - ], - "header": "tkc/asset_info.h", - "name": "asset_font_type_t", - "prefix": "ASSET_FONT_TYPE_", - "level": 1 - }, - { - "type": "enum", - "desc": "数据资源类型定义。", - "consts": [ - { - "desc": "未知数据类型。", - "name": "ASSET_TYPE_DATA_NONE" - }, - { - "desc": "文本数据类型。", - "name": "ASSET_TYPE_DATA_TEXT" - }, - { - "desc": "二进制数据类型。", - "name": "ASSET_TYPE_DATA_BIN" - }, - { - "desc": "JSON数据类型。", - "name": "ASSET_TYPE_DATA_JSON" - }, - { - "desc": "通用数据类型。", - "name": "ASSET_TYPE_DATA_DAT" - } - ], - "header": "tkc/asset_info.h", - "name": "asset_data_type_t", - "prefix": "ASSET_DATA_TYPE_", - "level": 1 - }, - { - "type": "enum", - "desc": "脚本资源类型定义。", - "consts": [ - { - "desc": "未知脚本类型。", - "name": "ASSET_TYPE_SCRIPT_NONE" - }, - { - "desc": "JS脚本类型。", - "name": "ASSET_TYPE_SCRIPT_JS" - }, - { - "desc": "LUA脚本类型。", - "name": "ASSET_TYPE_SCRIPT_LUA" - }, - { - "desc": "Python脚本类型。", - "name": "ASSET_TYPE_SCRIPT_PYTHON" - } - ], - "header": "tkc/asset_info.h", - "name": "asset_script_type_t", - "prefix": "ASSET_SCRIPT_TYPE_", - "level": 1 - }, - { - "type": "enum", - "desc": "图片资源类型定义。", - "consts": [ - { - "desc": "未知图片类型。", - "name": "ASSET_TYPE_IMAGE_NONE" - }, - { - "desc": "Raw图片类型。", - "name": "ASSET_TYPE_IMAGE_RAW" - }, - { - "desc": "位图图片类型。", - "name": "ASSET_TYPE_IMAGE_BMP" - }, - { - "desc": "PNG图片类型。", - "name": "ASSET_TYPE_IMAGE_PNG" - }, - { - "desc": "JPG图片类型。", - "name": "ASSET_TYPE_IMAGE_JPG" - }, - { - "desc": "BSVG图片类型。", - "name": "ASSET_TYPE_IMAGE_BSVG" - }, - { - "desc": "GIF图片类型。", - "name": "ASSET_TYPE_IMAGE_GIF" - }, - { - "desc": "WEBP图片类型。", - "name": "ASSET_TYPE_IMAGE_WEBP" - }, - { - "desc": "LZ4压缩的图片类型。", - "name": "ASSET_TYPE_IMAGE_LZ4" - }, - { - "desc": "其它图片类型。", - "name": "ASSET_TYPE_IMAGE_OTHER" - } - ], - "header": "tkc/asset_info.h", - "name": "asset_image_type_t", - "prefix": "ASSET_IMAGE_TYPE_", - "level": 1 - }, - { - "type": "enum", - "desc": "UI资源类型定义。", - "consts": [ - { - "desc": "无效UI类型。", - "name": "ASSET_TYPE_UI_NONE" - }, - { - "desc": "二进制的UI类型。", - "name": "ASSET_TYPE_UI_BIN" - }, - { - "desc": "XML格式的UI类型。", - "name": "ASSET_TYPE_UI_XML" - } - ], - "header": "tkc/asset_info.h", - "name": "asset_ui_type_t", - "prefix": "ASSET_UI_TYPE_", - "level": 1 - }, - { - "type": "class", - "methods": [], - "events": [], - "properties": [], - "header": "tkc/asset_info.h", - "desc": "预加载资源的描述信息。", - "name": "preload_res_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "uint16_t", - "name": "type", - "desc": "资源的类型。" - }, - { - "type": "uint16_t", - "name": "subtype", - "desc": "资源的子类型。" - }, - { - "type": "const char*", - "name": "name", - "desc": "资源的名称。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "资源的数据长度(用于分配空间)。" - } - ], - "annotation": { - "constructor": true - }, - "desc": "创建asset_info对象。\n\n> 主要供脚本语言使用。", - "name": "asset_info_create", - "return": { - "type": "asset_info_t*", - "desc": "asset_info对象。" - } - }, - { - "params": [ - { - "type": "asset_info_t*", - "name": "info", - "desc": "asset_info对象。" - } - ], - "annotation": { - "deconstructor": true - }, - "desc": "销毁asset_info对象。", - "name": "asset_info_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "asset_info_t*", - "name": "info", - "desc": "asset_info对象。" - } - ], - "annotation": {}, - "desc": "减少asset_info对象的引用计数。", - "name": "asset_info_unref", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "asset_info_t*", - "name": "info", - "desc": "asset_info对象。" - } - ], - "annotation": {}, - "desc": "增加asset_info对象的引用计数。", - "name": "asset_info_ref", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "const char*", - "name": "name", - "desc": "未格式化名字。" - } - ], - "annotation": {}, - "desc": "把资源名字格式化为符合标准长度的字符串。", - "name": "asset_info_get_formatted_name", - "return": { - "type": "ret_t", - "desc": "返回格式化后的名字。" - } - } - ], - "events": [], - "properties": [ - { - "name": "type", - "desc": "类型。", - "type": "uint16_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "subtype", - "desc": "子类型。", - "type": "uint8_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "is_in_rom", - "desc": "资源是否在ROM中。", - "type": "uint8_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "size", - "desc": "大小。", - "type": "uint32_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "refcount", - "desc": "引用计数。\nis\\_in\\_rom == FALSE时才有效。", - "type": "uint32_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "name", - "desc": "名称。", - "type": "char*", - "annotation": { - "readable": true, - "scriptable": true - } - } - ], - "header": "tkc/asset_info.h", - "desc": "单个资源的描述信息。", - "name": "asset_info_t", - "annotation": { - "scriptable": true - }, - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "async_exec_t", - "name": "exec", - "desc": "需要异步支持的函数。" - }, - { - "type": "async_on_result_t", - "name": "on_result", - "desc": "返回执行结果(可选)" - }, - { - "type": "void*", - "name": "ctx", - "desc": "两个回调函数的上下文。" - } - ], - "annotation": { - "static": true - }, - "desc": "异步执行exec函数,执行完成后,在后台线程调用on_result函数。", - "name": "async_call", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [], - "annotation": { - "static": true - }, - "desc": "全局初始化。", - "name": "async_call_init", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [], - "annotation": { - "static": true - }, - "desc": "全局~初始化。", - "name": "async_call_deinit", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [], - "header": "tkc/async.h", - "desc": "异步请求。", - "name": "async_t", - "annotation": { - "fake": true - }, - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "wbuffer_t*", - "name": "wbuffer", - "desc": "wbuffer对象。" - }, - { - "type": "uint8_t*", - "name": "data", - "desc": "缓冲区。" - }, - { - "type": "uint16_t", - "name": "capacity", - "desc": "缓冲区的容量。" - } - ], - "annotation": { - "constructor": true - }, - "desc": "初始wbuffer对象。", - "name": "wbuffer_init", - "return": { - "type": "wbuffer_t*", - "desc": "wbuffer对象本身。" - } - }, - { - "params": [ - { - "type": "wbuffer_t*", - "name": "wbuffer", - "desc": "wbuffer对象。" - } - ], - "annotation": { - "constructor": true - }, - "desc": "初始wbuffer对象,容量不够时是否支持自动扩展,使用完成后需要调用wbuffer\\_deinit释放资源。", - "name": "wbuffer_init_extendable", - "return": { - "type": "wbuffer_t*", - "desc": "wbuffer对象本身。" - } - }, - { - "params": [ - { - "type": "wbuffer_t*", - "name": "wbuffer", - "desc": "wbuffer对象。" - }, - { - "type": "uint32_t", - "name": "capacity", - "desc": "缓冲区的容量。" - } - ], - "annotation": {}, - "desc": "扩展缓冲区至指定的大小。", - "name": "wbuffer_extend_capacity", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "wbuffer_t*", - "name": "wbuffer", - "desc": "wbuffer对象。" - } - ], - "annotation": {}, - "desc": "释放资源。", - "name": "wbuffer_deinit", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "wbuffer_t*", - "name": "wbuffer", - "desc": "wbuffer对象。" - }, - { - "type": "int32_t", - "name": "delta", - "desc": "跳过的偏移量,正数往前负数往回跳。" - } - ], - "annotation": {}, - "desc": "跳过指定的长度。", - "name": "wbuffer_skip", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "wbuffer_t*", - "name": "wbuffer", - "desc": "wbuffer对象。" - }, - { - "type": "uint8_t", - "name": "value", - "desc": "要写入的数据。" - } - ], - "annotation": {}, - "desc": "写入uint8数据。", - "name": "wbuffer_write_uint8", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "wbuffer_t*", - "name": "wbuffer", - "desc": "wbuffer对象。" - }, - { - "type": "uint16_t", - "name": "value", - "desc": "要写入的数据。" - } - ], - "annotation": {}, - "desc": "写入uint16数据。", - "name": "wbuffer_write_uint16", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "wbuffer_t*", - "name": "wbuffer", - "desc": "wbuffer对象。" - }, - { - "type": "uint32_t", - "name": "value", - "desc": "要写入的数据。" - } - ], - "annotation": {}, - "desc": "写入uint32数据。", - "name": "wbuffer_write_uint32", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "wbuffer_t*", - "name": "wbuffer", - "desc": "wbuffer对象。" - }, - { - "type": "float_t", - "name": "value", - "desc": "要写入的数据。" - } - ], - "annotation": {}, - "desc": "写入float数据。", - "name": "wbuffer_write_float", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "wbuffer_t*", - "name": "wbuffer", - "desc": "wbuffer对象。" - }, - { - "type": "void*", - "name": "data", - "desc": "要写入的数据。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "要写入的数据长度。" - } - ], - "annotation": {}, - "desc": "写入指定长度的二进制数据。", - "name": "wbuffer_write_binary", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "wbuffer_t*", - "name": "wbuffer", - "desc": "wbuffer对象。" - }, - { - "type": "char*", - "name": "data", - "desc": "要写入的字符串。" - } - ], - "annotation": {}, - "desc": "写入字符串。", - "name": "wbuffer_write_string", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "wbuffer_t*", - "name": "wbuffer", - "desc": "wbuffer对象。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "空间大小。" - } - ], - "annotation": {}, - "desc": "是否还有空间。", - "name": "wbuffer_has_room", - "return": { - "type": "bool_t", - "desc": "返回FALSE表示无,否则表示有。" - } - } - ], - "events": [], - "properties": [ - { - "name": "data", - "desc": "数据缓冲区。用于保存写入的数据。", - "type": "uint8_t*", - "annotation": { - "readable": true - } - }, - { - "name": "cursor", - "desc": "当前写入位置。", - "type": "uint32_t", - "annotation": { - "readable": true - } - }, - { - "name": "capacity", - "desc": "数据缓冲区最大容量。", - "type": "uint32_t", - "annotation": { - "readable": true - } - }, - { - "name": "extendable", - "desc": "容量不够时是否支持自动扩展。", - "type": "bool_t", - "annotation": { - "readable": true - } - } - ], - "header": "tkc/buffer.h", - "desc": "Write Buffer。用于数据打包。\n\n示例:\n\n```c\nuint8_t buff[128];\nwbuffer_t wbuffer;\nrbuffer_t rbuffer;\nconst char* str = NULL;\nwbuffer_init(&wbuffer, buff, sizeof(buff));\n\nwbuffer_write_string(&wbuffer, \"hello awtk\");\n\nrbuffer_init(&rbuffer, wbuffer.data, wbuffer.cursor);\nrbuffer_read_string(&rbuffer, &str);\n```\n\n```c\nwbuffer_t wbuffer;\nwbuffer_init_extendable(&wbuffer);\n\nwbuffer_write_string(&wbuffer, \"hello awtk\");\n\nwbuffer_deinit(&wbuffer);\n```\n> 如果初始化为extendable,则最后需要调用wbuffer\\_deinit释放资源。", - "name": "wbuffer_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "rbuffer_t*", - "name": "rbuffer", - "desc": "rbuffer对象。" - }, - { - "type": "uint8_t*", - "name": "data", - "desc": "缓冲区。" - }, - { - "type": "uint16_t", - "name": "capacity", - "desc": "缓冲区的容量。" - } - ], - "annotation": { - "constructor": true - }, - "desc": "初始rbuffer对象。", - "name": "rbuffer_init", - "return": { - "type": "rbuffer_t*", - "desc": "rbuffer对象本身。" - } - }, - { - "params": [ - { - "type": "rbuffer_t*", - "name": "rbuffer", - "desc": "rbuffer对象。" - } - ], - "annotation": {}, - "desc": "判断是否还有数据可读。", - "name": "rbuffer_has_more", - "return": { - "type": "bool_t", - "desc": "返回TRUE表示还有数据可读,否则表示无数据可读。" - } - }, - { - "params": [ - { - "type": "rbuffer_t*", - "name": "rbuffer", - "desc": "rbuffer对象。" - }, - { - "type": "int32_t", - "name": "offset", - "desc": "跳过的偏移量,正数往前负数往回跳。" - } - ], - "annotation": {}, - "desc": "跳过指定的长度。", - "name": "rbuffer_skip", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "rbuffer_t*", - "name": "rbuffer", - "desc": "rbuffer对象。" - }, - { - "type": "uint8_t*", - "name": "value", - "desc": "返回读取的数据。" - } - ], - "annotation": {}, - "desc": "读取uint8数据。", - "name": "rbuffer_read_uint8", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "rbuffer_t*", - "name": "rbuffer", - "desc": "rbuffer对象。" - }, - { - "type": "uint16_t*", - "name": "value", - "desc": "读取的数据。" - } - ], - "annotation": {}, - "desc": "读取uint16数据。", - "name": "rbuffer_read_uint16", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "rbuffer_t*", - "name": "rbuffer", - "desc": "rbuffer对象。" - }, - { - "type": "uint32_t*", - "name": "value", - "desc": "返回读取的数据。" - } - ], - "annotation": {}, - "desc": "读取uint32数据。", - "name": "rbuffer_read_uint32", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "rbuffer_t*", - "name": "rbuffer", - "desc": "rbuffer对象。" - }, - { - "type": "float_t*", - "name": "value", - "desc": "返回读取的数据。" - } - ], - "annotation": {}, - "desc": "读取float数据。", - "name": "rbuffer_read_float", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "rbuffer_t*", - "name": "rbuffer", - "desc": "rbuffer对象。" - }, - { - "type": "void*", - "name": "data", - "desc": "返回读取的数据。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "读取的数据长度。" - } - ], - "annotation": {}, - "desc": "读取指定长度的二进制数据。", - "name": "rbuffer_read_binary", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "rbuffer_t*", - "name": "rbuffer", - "desc": "rbuffer对象。" - }, - { - "type": "char**", - "name": "str", - "desc": "返回字符串。" - } - ], - "annotation": {}, - "desc": "读取字符串。", - "name": "rbuffer_read_string", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "rbuffer_t*", - "name": "rbuffer", - "desc": "rbuffer对象。" - }, - { - "type": "uint8_t*", - "name": "value", - "desc": "返回读取的数据。" - } - ], - "annotation": {}, - "desc": "读取uint8数据,但不改变cursor的位置。", - "name": "rbuffer_peek_uint8", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "rbuffer_t*", - "name": "rbuffer", - "desc": "rbuffer对象。" - }, - { - "type": "uint16_t*", - "name": "value", - "desc": "返回读取的数据。" - } - ], - "annotation": {}, - "desc": "读取uint16数据,但不改变cursor的位置。", - "name": "rbuffer_peek_uint16", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "rbuffer_t*", - "name": "rbuffer", - "desc": "rbuffer对象。" - }, - { - "type": "uint32_t*", - "name": "value", - "desc": "读取的数据。" - } - ], - "annotation": {}, - "desc": "读取uint32数据,但不改变cursor的位置。", - "name": "rbuffer_peek_uint32", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [ - { - "name": "data", - "desc": "数据缓冲区。", - "type": "uint8_t*", - "annotation": { - "readable": true - } - }, - { - "name": "cursor", - "desc": "当前读取位置。", - "type": "uint32_t", - "annotation": { - "readable": true - } - }, - { - "name": "capacity", - "desc": "缓存区的容量。", - "type": "uint32_t", - "annotation": { - "readable": true - } - } - ], - "header": "tkc/buffer.h", - "desc": "Read Buffer。用于数据解包。\n\n示例:\n\n```c\nuint8_t buff[128];\nwbuffer_t wbuffer;\nrbuffer_t rbuffer;\nconst char* str = NULL;\nwbuffer_init(&wbuffer, buff, sizeof(buff));\n\nwbuffer_write_string(&wbuffer, \"hello awtk\");\n\nrbuffer_init(&rbuffer, wbuffer.data, wbuffer.cursor);\nrbuffer_read_string(&rbuffer, &str);\n```", - "name": "rbuffer_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "const char*", - "name": "color", - "desc": "字符串格式的颜色。" - } - ], - "annotation": { - "static": true - }, - "desc": "把字符串格式的颜色转换成color\\_t对象。\n\n目前支持下列格式:\n\n* 16进制格式。如:\"#112233\"\n* 颜色名称格式。如:\"green\"\n* rgb格式。如:\"rgb(11,22,33)\"\n* rgba格式。如:\"rgba(11,22,33,0.5)\"", - "name": "color_parse", - "return": { - "type": "void*", - "desc": "返回color_t对象。" - } - } - ], - "events": [], - "properties": [], - "header": "tkc/color_parser.h", - "desc": "颜色解析相关函数。\n\n示例:\n\n```c\ncolor_t c;\nc = color_parse(\"#112233\");\nc = color_parse(\"white\");\nc = color_parse(\"rgb(11,22,33)\");\nc = color_parse(\"rgba(11,22,33,0.5)\");\n```", - "name": "color_parser_t", - "annotation": { - "fake": true - }, - "level": 1 - }, - { - "type": "class", - "methods": [], - "events": [], - "properties": [ - { - "name": "r", - "desc": "红色。", - "type": "uint8_t", - "annotation": { - "readable": true, - "writable": true - } - }, - { - "name": "g", - "desc": "绿色。", - "type": "uint8_t", - "annotation": { - "readable": true, - "writable": true - } - }, - { - "name": "b", - "desc": "蓝色。", - "type": "uint8_t", - "annotation": { - "readable": true, - "writable": true - } - }, - { - "name": "a", - "desc": "alpha。", - "type": "uint8_t", - "annotation": { - "readable": true, - "writable": true - } - } - ], - "header": "tkc/color.h", - "desc": "颜色的四个通道。", - "name": "rgba_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "uint8_t", - "name": "r", - "desc": "红色。" - }, - { - "type": "uint8_t", - "name": "g", - "desc": "绿色。" - }, - { - "type": "uint8_t", - "name": "b", - "desc": "蓝色。" - }, - { - "type": "uint8_t", - "name": "a", - "desc": "alpha。" - } - ], - "annotation": { - "constructor": true - }, - "desc": "初始化颜色对象。", - "name": "color_init", - "return": { - "type": "color_t", - "desc": "颜色对象。" - } - }, - { - "params": [ - { - "type": "uint8_t", - "name": "r", - "desc": "红色通道。" - }, - { - "type": "uint8_t", - "name": "b", - "desc": "蓝色通道。" - }, - { - "type": "uint8_t", - "name": "g", - "desc": "绿色通道。" - }, - { - "type": "uint8_t", - "name": "a", - "desc": "alpha通道。" - } - ], - "annotation": { - "constructor": true, - "scriptable": true, - "gc": true - }, - "desc": "创建color对象。\n\n> 主要供脚本语言使用。", - "name": "color_create", - "return": { - "type": "color_t*", - "desc": "color对象。" - } - }, - { - "params": [ - { - "type": "color_t*", - "name": "c", - "desc": "color对象。" - }, - { - "type": "const char*", - "name": "str", - "desc": "css类似的颜色值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "创建color对象。\n\n> 主要供脚本语言使用。", - "name": "color_from_str", - "return": { - "type": "color_t*", - "desc": "color对象。" - } - }, - { - "params": [ - { - "type": "color_t*", - "name": "c", - "desc": "color对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取红色通道的值。\n\n> 主要供脚本语言使用。", - "name": "color_r", - "return": { - "type": "uint8_t", - "desc": "返回红色通道的值。" - } - }, - { - "params": [ - { - "type": "color_t*", - "name": "c", - "desc": "color对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取绿色通道的值。\n\n> 主要供脚本语言使用。", - "name": "color_g", - "return": { - "type": "uint8_t", - "desc": "返回绿色通道的值。" - } - }, - { - "params": [ - { - "type": "color_t*", - "name": "c", - "desc": "color对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取蓝色通道的值。\n\n> 主要供脚本语言使用。", - "name": "color_b", - "return": { - "type": "uint8_t", - "desc": "返回蓝色通道的值。" - } - }, - { - "params": [ - { - "type": "color_t*", - "name": "c", - "desc": "color对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取alpha通道的值。\n\n> 主要供脚本语言使用。", - "name": "color_a", - "return": { - "type": "uint8_t", - "desc": "返回alpha通道的值。" - } - }, - { - "params": [ - { - "type": "color_t*", - "name": "color", - "desc": "color对象。" - } - ], - "annotation": { - "cast": true, - "scriptable": true - }, - "desc": "转换为color对象。\n\n> 供脚本语言使用。", - "name": "color_cast", - "return": { - "type": "color_t*", - "desc": "color对象。" - } - }, - { - "params": [ - { - "type": "color_t*", - "name": "c", - "desc": "color对象。" - } - ], - "annotation": { - "deconstructor": true, - "scriptable": true, - "gc": true - }, - "desc": "销毁color对象。\n> 主要供脚本语言使用。", - "name": "color_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "color_t*", - "name": "c", - "desc": "color对象。" - }, - { - "type": "char*", - "name": "str", - "desc": "内存。" - } - ], - "annotation": {}, - "desc": "获取16进制格式表示的颜色", - "name": "color_hex_str", - "return": { - "type": "char*", - "desc": "获取16进制字符串表示的颜色。" - } - }, - { - "params": [ - { - "type": "color_t*", - "name": "c", - "desc": "color对象。" - }, - { - "type": "char*", - "name": "str", - "desc": "内存。" - } - ], - "annotation": {}, - "desc": "获取rgba格式表示的颜色", - "name": "color_rgba_str", - "return": { - "type": "char*", - "desc": "获取rgba格式表示的颜色。" - } - } - ], - "events": [], - "properties": [ - { - "name": "rgba", - "desc": "颜色的RGBA值。", - "type": "rgba_t", - "annotation": { - "readable": true, - "writable": true - } - }, - { - "name": "color", - "desc": "颜色的数值。", - "type": "uint32_t", - "annotation": { - "readable": true, - "writable": true, - "scriptable": true - } - } - ], - "header": "tkc/color.h", - "desc": "颜色。", - "name": "color_t", - "annotation": { - "scriptable": true - }, - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "compressor_t*", - "name": "compressor", - "desc": "compressor对象。" - }, - { - "type": "const void*", - "name": "data", - "desc": "待压缩的数据。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "数据长度。" - }, - { - "type": "wbuffer_t*", - "name": "out", - "desc": "压缩之后的数据。" - } - ], - "annotation": {}, - "desc": "压缩数据。", - "name": "compressor_compress", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "compressor_t*", - "name": "compressor", - "desc": "compressor对象。" - }, - { - "type": "const void*", - "name": "data", - "desc": "待解压的数据。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "数据长度。" - }, - { - "type": "wbuffer_t*", - "name": "out", - "desc": "解压之后的数据。" - } - ], - "annotation": {}, - "desc": "解压数据。", - "name": "compressor_uncompress", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "compressor_t*", - "name": "compressor", - "desc": "compressor对象。" - } - ], - "annotation": {}, - "desc": "销毁compressor对象。", - "name": "compressor_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [], - "header": "tkc/compressor.h", - "desc": "压缩解压接口。", - "name": "compressor_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [], - "annotation": {}, - "desc": "创建cond_var。", - "name": "tk_cond_var_create", - "return": { - "type": "tk_cond_var_t*", - "desc": "cond_var对象。" - } - }, - { - "params": [ - { - "type": "tk_cond_var_t*", - "name": "cond_var", - "desc": "cond_var对象。" - }, - { - "type": "uint32_t*", - "name": "timeout_ms", - "desc": "最长等待时间。" - } - ], - "annotation": {}, - "desc": "等待。", - "name": "tk_cond_var_wait", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "tk_cond_var_t*", - "name": "cond_var", - "desc": "cond_var对象。" - } - ], - "annotation": {}, - "desc": "唤醒。", - "name": "tk_cond_var_awake", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "tk_cond_var_t*", - "name": "cond_var", - "desc": "cond_var对象。" - } - ], - "annotation": {}, - "desc": "销毁cond_var对象。", - "name": "tk_cond_var_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [], - "header": "tkc/cond_var.h", - "desc": "简化版的条件变量。", - "name": "tk_cond_var_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [], - "annotation": {}, - "desc": "创建cond。", - "name": "tk_cond_create", - "return": { - "type": "tk_cond_t*", - "desc": "cond对象。" - } - }, - { - "params": [ - { - "type": "tk_cond_t*", - "name": "cond", - "desc": "cond对象。" - }, - { - "type": "tk_mutex_t*", - "name": "mutex", - "desc": "mutex对象。" - } - ], - "annotation": {}, - "desc": "等待。", - "name": "tk_cond_wait", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "tk_cond_t*", - "name": "cond", - "desc": "cond对象。" - }, - { - "type": "tk_mutex_t*", - "name": "mutex", - "desc": "mutex对象。" - }, - { - "type": "uint32_t*", - "name": "timeout_ms", - "desc": "最长等待时间。" - } - ], - "annotation": {}, - "desc": "等待指定时间。", - "name": "tk_cond_wait_timeout", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "tk_cond_t*", - "name": "cond", - "desc": "cond对象。" - } - ], - "annotation": {}, - "desc": "唤醒。", - "name": "tk_cond_signal", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "tk_cond_t*", - "name": "cond", - "desc": "cond对象。" - } - ], - "annotation": {}, - "desc": "销毁cond对象。", - "name": "tk_cond_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [], - "header": "tkc/cond.h", - "desc": "条件变量。", - "name": "tk_cond_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "uint32_t", - "name": "capacity", - "desc": "数组的初始容量。" - }, - { - "type": "tk_destroy_t", - "name": "destroy", - "desc": "元素销毁函数。" - }, - { - "type": "tk_compare_t", - "name": "compare", - "desc": "元素比较函数。" - } - ], - "annotation": { - "constructor": true - }, - "desc": "创建darray对象。", - "name": "darray_create", - "return": { - "type": "darray_t*", - "desc": "数组对象。" - } - }, - { - "params": [ - { - "type": "darray_t*", - "name": "darray", - "desc": "数组对象。" - }, - { - "type": "uint32_t*", - "name": "capacity", - "desc": "数组的初始容量。" - }, - { - "type": "tk_destroy_t", - "name": "destroy", - "desc": "元素销毁函数。" - }, - { - "type": "tk_compare_t", - "name": "compare", - "desc": "元素比较函数。" - } - ], - "annotation": {}, - "desc": "初始化darray对象。", - "name": "darray_init", - "return": { - "type": "darray_t*", - "desc": "数组对象。" - } - }, - { - "params": [ - { - "type": "darray_t*", - "name": "darray", - "desc": "数组对象。" - }, - { - "type": "void*", - "name": "ctx", - "desc": "比较函数的上下文。" - } - ], - "annotation": {}, - "desc": "查找第一个满足条件的元素。", - "name": "darray_find", - "return": { - "type": "void*", - "desc": "如果找到,返回满足条件的对象,否则返回NULL。" - } - }, - { - "params": [ - { - "type": "darray_t*", - "name": "darray", - "desc": "数组对象。" - }, - { - "type": "tk_compare_t", - "name": "cmp", - "desc": "比较函数,为NULL则使用内置的比较函数。" - }, - { - "type": "void*", - "name": "ctx", - "desc": "比较函数的上下文。" - } - ], - "annotation": {}, - "desc": "二分查找(确保数组有序)。", - "name": "darray_bsearch_index", - "return": { - "type": "int", - "desc": "如果找到,返回满足条件的对象的位置,否则返回-1。" - } - }, - { - "params": [ - { - "type": "darray_t*", - "name": "darray", - "desc": "数组对象。" - }, - { - "type": "tk_compare_t", - "name": "cmp", - "desc": "比较函数,为NULL则使用内置的比较函数。" - }, - { - "type": "void*", - "name": "ctx", - "desc": "比较函数的上下文。" - } - ], - "annotation": {}, - "desc": "二分查找(确保数组有序)。", - "name": "darray_bsearch", - "return": { - "type": "void*", - "desc": "如果找到,返回满足条件的对象,否则返回NULL。" - } - }, - { - "params": [ - { - "type": "darray_t*", - "name": "darray", - "desc": "数组对象。" - }, - { - "type": "uint32_t", - "name": "index", - "desc": "序数。" - } - ], - "annotation": {}, - "desc": "获取指定序数的元素。", - "name": "darray_get", - "return": { - "type": "void*", - "desc": "返回满足条件的对象,否则返回NULL。" - } - }, - { - "params": [ - { - "type": "darray_t*", - "name": "darray", - "desc": "数组对象。" - }, - { - "type": "void*", - "name": "ctx", - "desc": "比较函数的上下文。" - } - ], - "annotation": {}, - "desc": "查找第一个满足条件的元素,并返回位置。", - "name": "darray_find_index", - "return": { - "type": "int", - "desc": "如果找到,返回满足条件的对象的位置,否则返回-1。" - } - }, - { - "params": [ - { - "type": "darray_t*", - "name": "darray", - "desc": "数组对象。" - }, - { - "type": "void*", - "name": "ctx", - "desc": "比较函数的上下文。" - } - ], - "annotation": {}, - "desc": "删除第一个满足条件的元素。", - "name": "darray_remove", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "darray_t*", - "name": "darray", - "desc": "数组对象。" - }, - { - "type": "uint32_t", - "name": "index", - "desc": "位置序数。" - } - ], - "annotation": {}, - "desc": "删除指定位置的元素。", - "name": "darray_remove_index", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "darray_t*", - "name": "darray", - "desc": "数组对象。" - }, - { - "type": "tk_compare_t", - "name": "cmp", - "desc": "比较函数,为NULL则使用内置的比较函数。" - }, - { - "type": "void*", - "name": "ctx", - "desc": "比较函数的上下文。" - } - ], - "annotation": {}, - "desc": "删除全部满足条件的元素。", - "name": "darray_remove_all", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "darray_t*", - "name": "darray", - "desc": "数组对象。" - }, - { - "type": "tk_compare_t", - "name": "cmp", - "desc": "比较函数,为NULL则使用内置的比较函数。" - } - ], - "annotation": {}, - "desc": "排序。", - "name": "darray_sort", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "darray_t*", - "name": "darray", - "desc": "数组对象。" - }, - { - "type": "tk_compare_t", - "name": "cmp", - "desc": "比较函数,为NULL则使用内置的比较函数。" - }, - { - "type": "void*", - "name": "ctx", - "desc": "比较函数的上下文。" - }, - { - "type": "darray_t*", - "name": "matched", - "desc": "返回满足条件的元素。" - } - ], - "annotation": {}, - "desc": "查找全部满足条件的元素。\n\n```\ndarray_t matched;\ndarray_init(&matched, 0, NULL, NULL);\ndarray_find_all(darray, mycmp, myctx, &matched);\n...\ndarray_deinit(&matched);\n\n```", - "name": "darray_find_all", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "darray_t*", - "name": "darray", - "desc": "数组对象。" - } - ], - "annotation": {}, - "desc": "弹出最后一个元素。", - "name": "darray_pop", - "return": { - "type": "void*", - "desc": "成功返回最后一个元素,失败返回NULL。" - } - }, - { - "params": [ - { - "type": "darray_t*", - "name": "darray", - "desc": "数组对象。" - } - ], - "annotation": {}, - "desc": "返回最后一个元素。", - "name": "darray_tail", - "return": { - "type": "void*", - "desc": "成功返回最后一个元素,失败返回NULL。" - } - }, - { - "params": [ - { - "type": "darray_t*", - "name": "darray", - "desc": "数组对象。" - } - ], - "annotation": {}, - "desc": "返回第一个元素。", - "name": "darray_head", - "return": { - "type": "void*", - "desc": "成功返回最后一个元素,失败返回NULL。" - } - }, - { - "params": [ - { - "type": "darray_t*", - "name": "darray", - "desc": "数组对象。" - }, - { - "type": "void*", - "name": "data", - "desc": "待追加的元素。" - } - ], - "annotation": {}, - "desc": "在尾巴追加一个元素。", - "name": "darray_push", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "darray_t*", - "name": "darray", - "desc": "单向链表对象。" - }, - { - "type": "void*", - "name": "ctx", - "desc": "比较函数的上下文。" - } - ], - "annotation": {}, - "desc": "返回满足条件元素的个数。", - "name": "darray_count", - "return": { - "type": "int32_t", - "desc": "返回元素个数。" - } - }, - { - "params": [ - { - "type": "darray_t*", - "name": "darray", - "desc": "数组对象。" - } - ], - "annotation": {}, - "desc": "清除全部元素。", - "name": "darray_clear", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "darray_t*", - "name": "darray", - "desc": "数组对象。" - }, - { - "type": "tk_visit_t", - "name": "visit", - "desc": "遍历函数。" - }, - { - "type": "void*", - "name": "ctx", - "desc": "遍历函数的上下文。" - } - ], - "annotation": {}, - "desc": "遍历元素。", - "name": "darray_foreach", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "darray_t*", - "name": "darray", - "desc": "数组对象。" - } - ], - "annotation": {}, - "desc": "清除全部元素,并释放elms。", - "name": "darray_deinit", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "darray_t*", - "name": "darray", - "desc": "数组对象。" - } - ], - "annotation": {}, - "desc": "销毁darray对象。", - "name": "darray_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [ - { - "name": "size", - "desc": "数组中元素的个数。", - "type": "uint32_t", - "annotation": { - "readable": true - } - }, - { - "name": "capacity", - "desc": "数组的容量大小。", - "type": "uint32_t", - "annotation": { - "readable": true - } - }, - { - "name": "elms", - "desc": "数组中的元素。", - "type": "void**", - "annotation": { - "readable": true - } - }, - { - "name": "destroy", - "desc": "元素销毁函数。", - "type": "tk_destroy_t", - "annotation": { - "readable": true - } - }, - { - "name": "compare", - "desc": "元素比较函数。", - "type": "tk_compare_t", - "annotation": { - "readable": true - } - } - ], - "header": "tkc/darray.h", - "desc": "动态数组,根据元素个数动态调整数组的容量。\n\n用darray\\_init初始化时,用darray\\_deinit释放。如:\n\n```c\ndarray_t darray;\ndarray_init(&darray, 10, destroy, compare);\n...\ndarray_deinit(&darray);\n```\n\n用darray\\_create创建时,用darray\\_destroy销毁。如:\n\n```c\ndarray_t* darray = darray_create(10, destroy, compare);\n...\ndarray_destroy(darray);\n```", - "name": "darray_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [], - "annotation": { - "constructor": true - }, - "desc": "获取缺省的data reader工厂对象。", - "name": "data_reader_factory", - "return": { - "type": "data_reader_factory_t*", - "desc": "返回data reader工厂对象。" - } - }, - { - "params": [ - { - "type": "data_reader_factory_t*", - "name": "factory", - "desc": "data reader工厂对象。" - } - ], - "annotation": {}, - "desc": "设置缺省的data reader工厂对象。", - "name": "data_reader_factory_set", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [], - "annotation": { - "constructor": true - }, - "desc": "创建data reader工厂对象。", - "name": "data_reader_factory_create", - "return": { - "type": "data_reader_factory_t*", - "desc": "返回data reader工厂对象。" - } - }, - { - "params": [ - { - "type": "data_reader_factory_t*", - "name": "factory", - "desc": "reader工厂对象。" - }, - { - "type": "const char*", - "name": "protocol", - "desc": "协议(如file)。" - }, - { - "type": "data_reader_create_t", - "name": "create", - "desc": "data reader创建函数。" - } - ], - "annotation": {}, - "desc": "注册data reader创建函数。", - "name": "data_reader_factory_register", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "data_reader_factory_t*", - "name": "factory", - "desc": "data reader工厂对象。" - }, - { - "type": "const char*", - "name": "url", - "desc": "URL。" - } - ], - "annotation": { - "constructor": true - }, - "desc": "创建指定类型的data reader对象。", - "name": "data_reader_factory_create_reader", - "return": { - "type": "data_reader_t*", - "desc": "返回data reader对象。" - } - }, - { - "params": [ - { - "type": "data_reader_factory_t*", - "name": "factory", - "desc": "data reader工厂对象。" - } - ], - "annotation": {}, - "desc": "析构并释放data reader工厂对象。", - "name": "data_reader_factory_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [], - "header": "tkc/data_reader_factory.h", - "desc": "data reader工厂。", - "name": "data_reader_factory_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "data_reader_t*", - "name": "reader", - "desc": "reader对象。" - }, - { - "type": "uint64_t", - "name": "offset", - "desc": "偏移量。" - }, - { - "type": "void*", - "name": "data", - "desc": "用于读取数据的缓冲区。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "最大读取数据长度。" - } - ], - "annotation": {}, - "desc": "在指定位置读取数据。", - "name": "data_reader_read", - "return": { - "type": "int32_t", - "desc": "返回实际读取数据的长度。" - } - }, - { - "params": [ - { - "type": "data_reader_t*", - "name": "reader", - "desc": "reader对象。" - } - ], - "annotation": {}, - "desc": "获取数据长度。", - "name": "data_reader_get_size", - "return": { - "type": "uint64_t", - "desc": "返回数据长度。" - } - }, - { - "params": [ - { - "type": "data_reader_t*", - "name": "reader", - "desc": "reader对象。" - } - ], - "annotation": {}, - "desc": "销毁reader对象。", - "name": "data_reader_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "const char*", - "name": "url", - "desc": "URL。" - }, - { - "type": "uint32_t*", - "name": "size", - "desc": "返回数据长度。" - } - ], - "annotation": {}, - "desc": "从指定的URL读取全部数据。", - "name": "data_reader_read_all", - "return": { - "type": "void*", - "desc": "返回全部数据,调用者需要调用TKMEM_FREE释放返回值。" - } - } - ], - "events": [], - "properties": [], - "header": "tkc/data_reader.h", - "desc": "数据读取接口。\n\n>对可读的媒介,如内存、文件、flash、资源和其它媒介提供一个统一的读取接口。", - "name": "data_reader_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [], - "annotation": { - "constructor": true - }, - "desc": "获取缺省的data writer工厂对象。", - "name": "data_writer_factory", - "return": { - "type": "data_writer_factory_t*", - "desc": "返回data writer工厂对象。" - } - }, - { - "params": [ - { - "type": "data_writer_factory_t*", - "name": "factory", - "desc": "data writer工厂对象。" - } - ], - "annotation": {}, - "desc": "设置缺省的data writer工厂对象。", - "name": "data_writer_factory_set", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [], - "annotation": { - "constructor": true - }, - "desc": "创建data writer工厂对象。", - "name": "data_writer_factory_create", - "return": { - "type": "data_writer_factory_t*", - "desc": "返回data writer工厂对象。" - } - }, - { - "params": [ - { - "type": "data_writer_factory_t*", - "name": "factory", - "desc": "writer工厂对象。" - }, - { - "type": "const char*", - "name": "protocol", - "desc": "协议(如file)。" - }, - { - "type": "data_writer_create_t", - "name": "create", - "desc": "data writer创建函数。" - } - ], - "annotation": {}, - "desc": "注册data writer创建函数。", - "name": "data_writer_factory_register", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "data_writer_factory_t*", - "name": "factory", - "desc": "data writer工厂对象。" - }, - { - "type": "const char*", - "name": "url", - "desc": "URL。" - } - ], - "annotation": { - "constructor": true - }, - "desc": "创建指定类型的data writer对象。", - "name": "data_writer_factory_create_writer", - "return": { - "type": "data_writer_t*", - "desc": "返回data writer对象。" - } - }, - { - "params": [ - { - "type": "data_writer_factory_t*", - "name": "factory", - "desc": "data writer工厂对象。" - } - ], - "annotation": {}, - "desc": "析构并释放data writer工厂对象。", - "name": "data_writer_factory_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [], - "header": "tkc/data_writer_factory.h", - "desc": "data writer工厂。", - "name": "data_writer_factory_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "data_writer_t*", - "name": "writer", - "desc": "writer对象。" - }, - { - "type": "uint64_t", - "name": "offset", - "desc": "偏移量。" - }, - { - "type": "const void*", - "name": "data", - "desc": "数据缓冲区。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "数据长度。" - } - ], - "annotation": {}, - "desc": "在指定位置写入数据。", - "name": "data_writer_write", - "return": { - "type": "int32_t", - "desc": "返回实际读取数据的长度。" - } - }, - { - "params": [ - { - "type": "data_writer_t*", - "name": "writer", - "desc": "writer对象。" - } - ], - "annotation": {}, - "desc": "销毁writer对象。", - "name": "data_writer_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [], - "header": "tkc/data_writer.h", - "desc": "数据写入接口。\n\n>对可写的媒介,如内存、文件、flash和其它媒介提供一个统一的写入接口。", - "name": "data_writer_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [], - "annotation": { - "constructor": true, - "scriptable": true, - "gc": true - }, - "desc": "创建date_time对象,并初始为当前日期和时间(一般供脚本语言中使用)。", - "name": "date_time_create", - "return": { - "type": "date_time_t*", - "desc": "返回date_time对象。" - } - }, - { - "params": [ - { - "type": "date_time_t*", - "name": "dt", - "desc": "date_time对象。" - } - ], - "annotation": {}, - "desc": "初始为当前日期和时间。", - "name": "date_time_init", - "return": { - "type": "date_time_t*", - "desc": "返回date_time对象。" - } - }, - { - "params": [ - { - "type": "date_time_t*", - "name": "dt", - "desc": "date_time对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置当前时间。", - "name": "date_time_set", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "date_time_t*", - "name": "dt", - "desc": "date_time对象。" - }, - { - "type": "uint64_t", - "name": "time", - "desc": "时间。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "从time转换而来。", - "name": "date_time_from_time", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "date_time_t*", - "name": "dt", - "desc": "date_time对象。" - }, - { - "type": "int64_t", - "name": "delta", - "desc": "偏移量(s)。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "加上一个偏移量(s)。", - "name": "date_time_add_delta", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "uint32_t", - "name": "year", - "desc": "年份。" - } - ], - "annotation": { - "scriptable": true, - "static": true - }, - "desc": "是否是闰年。", - "name": "date_time_is_leap", - "return": { - "type": "bool_t", - "desc": "返回TRUE表示是,否则表示否。" - } - }, - { - "params": [ - { - "type": "uint32_t", - "name": "year", - "desc": "年份。" - }, - { - "type": "uint32_t", - "name": "montn", - "desc": "月份(1-12)。" - } - ], - "annotation": { - "scriptable": true, - "static": true - }, - "desc": "获取指定年份月份的天数。", - "name": "date_time_get_days", - "return": { - "type": "int32_t", - "desc": "返回大于0表示天数,否则表示失败。" - } - }, - { - "params": [ - { - "type": "uint32_t", - "name": "year", - "desc": "年份。" - }, - { - "type": "uint32_t", - "name": "montn", - "desc": "月份(1-12)。" - }, - { - "type": "uint32_t", - "name": "day", - "desc": "日(1-31)。" - } - ], - "annotation": { - "scriptable": true, - "static": true - }, - "desc": "获取指定日期是周几(0-6, Sunday = 0)。。", - "name": "date_time_get_wday", - "return": { - "type": "int32_t", - "desc": "返回大于等于0表示周几(0-6),否则表示失败。" - } - }, - { - "params": [ - { - "type": "uint32_t", - "name": "montn", - "desc": "月份(1-12)。" - } - ], - "annotation": { - "scriptable": true, - "static": true - }, - "desc": "获取指定月份的英文名称(简写)。", - "name": "date_time_get_month_name", - "return": { - "type": "const char*", - "desc": "返回指定月份的英文名称(简写)。" - } - }, - { - "params": [ - { - "type": "uint32_t", - "name": "wday", - "desc": "星期几(0-6, Sunday = 0)。" - } - ], - "annotation": { - "scriptable": true, - "static": true - }, - "desc": "获取周几的英文名称(简写)。", - "name": "date_time_get_wday_name", - "return": { - "type": "const char*", - "desc": "返回指定周几的英文名称(简写)。" - } - }, - { - "params": [ - { - "type": "date_time_t*", - "name": "dt", - "desc": "date_time对象。" - } - ], - "annotation": { - "deconstructor": true, - "scriptable": true, - "gc": true - }, - "desc": "销毁date_time对象(一般供脚本语言中使用)。", - "name": "date_time_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "date_time_vtable_t", - "name": "vt", - "desc": "日期和时间的相关函数的实现。" - } - ], - "annotation": {}, - "desc": "时间日期全局初始化。\n\n> 嵌入式平台需要提供并设置获取当前日期和时间的函数,否则相关的功能(如时钟控件)将无法正常工作。", - "name": "date_time_global_init_ex", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [ - { - "name": "second", - "desc": "秒(0 - 59)。", - "type": "int32_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "minute", - "desc": "分(0 - 59)。", - "type": "int32_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "hour", - "desc": "时(0 - 23)。", - "type": "int32_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "day", - "desc": "日(1-31)。", - "type": "int32_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "wday", - "desc": "星期几(0-6, Sunday = 0)。", - "type": "int32_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "month", - "desc": "月(1-12)。", - "type": "int32_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "year", - "desc": "年。", - "type": "int32_t", - "annotation": { - "readable": true, - "scriptable": true - } - } - ], - "header": "tkc/date_time.h", - "desc": "日期时间。\n\n> 在嵌入式平台中,在系统初始时,需要调用date\\_time\\_global\\_init设置实际获取/设置系统时间的函数。", - "name": "date_time_t", - "annotation": { - "scriptable": true - }, - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "const char*", - "name": "filename", - "desc": "文件名。" - } - ], - "annotation": {}, - "desc": "打开动态链接库。", - "name": "tk_dl_open", - "return": { - "type": "tk_dl_t*", - "desc": "动态链接库对象。" - } - }, - { - "params": [ - { - "type": "tk_dl_t*", - "name": "dl", - "desc": "dl对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "函数名。" - } - ], - "annotation": {}, - "desc": "获取指定名称函数的地址。", - "name": "tk_dl_sym", - "return": { - "type": "void*", - "desc": "返回函数的地址。" - } - }, - { - "params": [ - { - "type": "tk_dl_t*", - "name": "dl", - "desc": "dl对象。" - } - ], - "annotation": {}, - "desc": "关闭dl对象。", - "name": "tk_dl_close", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [], - "header": "tkc/dl.h", - "desc": "动态链接库对象。", - "name": "tk_dl_t", - "level": 1 - }, - { - "type": "enum", - "desc": "缓动作动画常量定义。", - "consts": [ - { - "desc": "EASING_LINEAR。", - "name": "EASING_LINEAR" - }, - { - "desc": "EASING_QUADRATIC_IN", - "name": "EASING_QUADRATIC_IN" - }, - { - "desc": "EASING_QUADRATIC_OUT", - "name": "EASING_QUADRATIC_OUT" - }, - { - "desc": "EASING_QUADRATIC_INOUT", - "name": "EASING_QUADRATIC_INOUT" - }, - { - "desc": "EASING_CUBIC_IN", - "name": "EASING_CUBIC_IN" - }, - { - "desc": "EASING_CUBIC_OUT", - "name": "EASING_CUBIC_OUT" - }, - { - "desc": "EASING_SIN_IN", - "name": "EASING_SIN_IN" - }, - { - "desc": "EASING_SIN_OUT", - "name": "EASING_SIN_OUT" - }, - { - "desc": "EASING_SIN_OUT", - "name": "EASING_SIN_INOUT" - }, - { - "desc": "EASING_POW_IN", - "name": "EASING_POW_IN" - }, - { - "desc": "EASING_POW_OUT", - "name": "EASING_POW_OUT" - }, - { - "desc": "EASING_POW_INOUT", - "name": "EASING_POW_INOUT" - }, - { - "desc": "EASING_CIRCULAR_IN", - "name": "EASING_CIRCULAR_IN" - }, - { - "desc": "EASING_CIRCULAR_OUT", - "name": "EASING_CIRCULAR_OUT" - }, - { - "desc": "EASING_CIRCULAR_INOUT", - "name": "EASING_CIRCULAR_INOUT" - }, - { - "desc": "EASING_ELASTIC_IN", - "name": "EASING_ELASTIC_IN" - }, - { - "desc": "EASING_ELASTIC_OUT", - "name": "EASING_ELASTIC_OUT" - }, - { - "desc": "EASING_ELASTIC_INOUT", - "name": "EASING_ELASTIC_INOUT" - }, - { - "desc": "EASING_BACK_IN", - "name": "EASING_BACK_IN" - }, - { - "desc": "EASING_BACK_OUT", - "name": "EASING_BACK_OUT" - }, - { - "desc": "EASING_BACK_INOUT", - "name": "EASING_BACK_INOUT" - }, - { - "desc": "EASING_BOUNCE_IN", - "name": "EASING_BOUNCE_IN" - }, - { - "desc": "EASING_BOUNCE_OUT", - "name": "EASING_BOUNCE_OUT" - }, - { - "desc": "EASING_BOUNCE_INOUT", - "name": "EASING_BOUNCE_INOUT" - } - ], - "header": "tkc/easing.h", - "name": "easing_type_t", - "prefix": "EASING_", - "annotation": { - "scriptable": true - }, - "level": 1 - }, - { - "params": [ - { - "type": "easing_type_t", - "name": "type", - "desc": "类型。" - } - ], - "annotation": { - "global": true - }, - "desc": "获取对应类型的操作函数。", - "name": "easing_get", - "return": { - "type": "easing_func_t", - "desc": "返回对应的操作函数地址。" - }, - "type": "method", - "header": "tkc/easing.h", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "event_source_manager_t*", - "name": "manager", - "desc": "event_source_manager对象。" - } - ], - "annotation": {}, - "desc": "初始化。", - "name": "event_source_manager_init", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "event_source_manager_t*", - "name": "manager", - "desc": "event_source_manager对象。" - } - ], - "annotation": {}, - "desc": "~初始化。", - "name": "event_source_manager_deinit", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "event_source_manager_t*", - "name": "manager", - "desc": "event_source_manager对象。" - } - ], - "annotation": {}, - "desc": "获取wakeup时间(ms)", - "name": "event_source_manager_get_wakeup_time", - "return": { - "type": "uint32_t", - "desc": "返回wakeup时间(ms)。" - } - }, - { - "params": [ - { - "type": "event_source_manager_t*", - "name": "manager", - "desc": "event_source_manager对象。" - } - ], - "annotation": {}, - "desc": "分发事件。", - "name": "event_source_manager_dispatch", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "event_source_manager_t*", - "name": "manager", - "desc": "event_source_manager对象。" - }, - { - "type": "event_source_t*", - "name": "source", - "desc": "event_source对象。" - } - ], - "annotation": {}, - "desc": "增加事件源对象。", - "name": "event_source_manager_add", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "event_source_manager_t*", - "name": "manager", - "desc": "event_source_manager对象。" - }, - { - "type": "event_source_t*", - "name": "source", - "desc": "event_source对象。" - } - ], - "annotation": {}, - "desc": "移除事件源对象。", - "name": "event_source_manager_remove", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "event_source_manager_t*", - "name": "manager", - "desc": "event_source_manager对象。" - }, - { - "type": "void*", - "name": "tag", - "desc": "tag。" - } - ], - "annotation": {}, - "desc": "移除所有tag相同的事件源对象。", - "name": "event_source_manager_remove_by_tag", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "event_source_manager_t*", - "name": "manager", - "desc": "event_source_manager对象。" - } - ], - "annotation": {}, - "desc": "销毁事件源管理器。", - "name": "event_source_manager_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [], - "header": "tkc/event_source_manager.h", - "desc": "事件源管理器。", - "name": "event_source_manager_t", - "level": 1 - }, - { - "type": "class", - "methods": [], - "events": [], - "properties": [ - { - "name": "size", - "desc": "文件大小。", - "type": "uint64_t" - }, - { - "name": "atime", - "desc": "最后访问时间。", - "type": "uint64_t" - }, - { - "name": "mtime", - "desc": "最后修改时间。", - "type": "uint64_t" - }, - { - "name": "ctime", - "desc": "创建时间。", - "type": "uint64_t" - }, - { - "name": "is_dir", - "desc": "是否为目录。", - "type": "bool_t" - }, - { - "name": "is_link", - "desc": "是否为链接。", - "type": "bool_t" - }, - { - "name": "is_reg_file", - "desc": "是否普通文件。", - "type": "bool_t" - } - ], - "header": "tkc/fs.h", - "desc": "文件状态信息。", - "name": "fs_stat_info_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "fs_file_t*", - "name": "file", - "desc": "文件对象。" - }, - { - "type": "void*", - "name": "buffer", - "desc": "用于返回数据的缓冲区。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "缓冲区大小。" - } - ], - "annotation": {}, - "desc": "读取文件。", - "name": "fs_file_read", - "return": { - "type": "int32_t", - "desc": "返回实际读取的字节数。" - } - }, - { - "params": [ - { - "type": "fs_file_t*", - "name": "file", - "desc": "文件对象。" - }, - { - "type": "char*", - "name": "buffer", - "desc": "用于返回数据的缓冲区。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "缓冲区大小。" - } - ], - "annotation": {}, - "desc": "读取一行文本。\n> 需要用二进制格式打开,否则Windows下,系统会修改换行符。", - "name": "fs_file_read_line", - "return": { - "type": "int32_t", - "desc": "返回实际读取的字节数。" - } - }, - { - "params": [ - { - "type": "fs_file_t*", - "name": "file", - "desc": "文件对象。" - }, - { - "type": "const void*", - "name": "buffer", - "desc": "数据缓冲区。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "数据长度。" - } - ], - "annotation": {}, - "desc": "写入文件。", - "name": "fs_file_write", - "return": { - "type": "int32_t", - "desc": "返回实际写入的字节数。" - } - }, - { - "params": [ - { - "type": "fs_file_t*", - "name": "file", - "desc": "文件对象。" - }, - { - "type": "const char* const", - "name": "format_str", - "desc": "格式化字符串。" - } - ], - "annotation": {}, - "desc": "写入文件。", - "name": "fs_file_printf", - "return": { - "type": "int32_t", - "desc": "返回实际写入的字节数。" - } - }, - { - "params": [ - { - "type": "fs_file_t*", - "name": "file", - "desc": "文件对象。" - }, - { - "type": "uint32_t", - "name": "offset", - "desc": "数据长度。" - } - ], - "annotation": {}, - "desc": "定位读写指针到指定的位置。", - "name": "fs_file_seek", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "fs_file_t*", - "name": "file", - "desc": "文件对象。" - } - ], - "annotation": {}, - "desc": "清除文件内容。", - "name": "fs_file_truncate", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "fs_file_t*", - "name": "file", - "desc": "文件对象。" - } - ], - "annotation": {}, - "desc": "关闭文件。", - "name": "fs_file_close", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "fs_file_t*", - "name": "file", - "desc": "文件对象。" - } - ], - "annotation": {}, - "desc": "同步文件到磁盘。", - "name": "fs_file_sync", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "fs_file_t*", - "name": "file", - "desc": "文件对象。" - }, - { - "type": "fs_stat_info_t*", - "name": "fst", - "desc": "文件状态信息。" - } - ], - "annotation": {}, - "desc": "获取文件信息。", - "name": "fs_file_stat", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "fs_file_t*", - "name": "file", - "desc": "文件对象。" - } - ], - "annotation": {}, - "desc": "判断文件是否结束。", - "name": "fs_file_eof", - "return": { - "type": "bool_t", - "desc": "返回TRUE表示结束,否则表示没结束。" - } - }, - { - "params": [ - { - "type": "fs_file_t*", - "name": "file", - "desc": "文件对象。" - } - ], - "annotation": {}, - "desc": "获取文件当前读写位置。", - "name": "fs_file_tell", - "return": { - "type": "int64_t", - "desc": "返回文件当前读写位置。" - } - }, - { - "params": [ - { - "type": "fs_file_t*", - "name": "file", - "desc": "文件对象。" - } - ], - "annotation": {}, - "desc": "获取文件大小。", - "name": "fs_file_size", - "return": { - "type": "int64_t", - "desc": "返回文件大小。" - } - } - ], - "events": [], - "properties": [], - "header": "tkc/fs.h", - "desc": "文件接口。\n\n示例:\n\n```c\nint32_t ret = 0;\nconst char* file_name = \"test.txt\";\nint32_t len = file_get_size(file_name);\nuint8_t* buff = (uint8_t*)TKMEM_ALLOC(len + 1);\nreturn_value_if_fail(buff != NULL, NULL);\n\nfs_file_t* fp = fs_open_file(os_fs(), file_name, \"rb\");\nif (fp != NULL) {\nret = fs_file_read(fp, buff, len);\nfs_file_close(fp);\n}\n```", - "name": "fs_file_t", - "annotation": { - "fake": true - }, - "level": 1 - }, - { - "type": "class", - "methods": [], - "events": [], - "properties": [ - { - "name": "is_dir", - "desc": "是否是目录。", - "type": "bool_t", - "annotation": { - "readable": true - } - }, - { - "name": "is_link", - "desc": "是否是符号链接。", - "type": "bool_t", - "annotation": { - "readable": true - } - }, - { - "name": "is_reg_file", - "desc": "是否是普通文件。", - "type": "bool_t", - "annotation": { - "readable": true - } - }, - { - "name": "name", - "desc": "名称。", - "type": "char*", - "annotation": { - "readable": true - } - } - ], - "header": "tkc/fs.h", - "desc": "代表目录或文件。", - "name": "fs_item_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "fs_dir_t*", - "name": "dir", - "desc": "文件夹对象。" - } - ], - "annotation": {}, - "desc": "重置文件夹读取位置到开始。", - "name": "fs_dir_rewind", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "fs_dir_t*", - "name": "dir", - "desc": "文件夹对象。" - }, - { - "type": "fs_item_t*", - "name": "item", - "desc": "返回一项。" - } - ], - "annotation": {}, - "desc": "读取文件夹对象。", - "name": "fs_dir_read", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "fs_dir_t*", - "name": "dir", - "desc": "文件夹对象。" - } - ], - "annotation": {}, - "desc": "关闭文件夹对象。", - "name": "fs_dir_close", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [], - "header": "tkc/fs.h", - "desc": "文件夹接口。", - "name": "fs_dir_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "fs_t*", - "name": "fs", - "desc": "文件系统对象,一般赋值为os_fs()。" - }, - { - "type": "const char*", - "name": "name", - "desc": "文件名。" - }, - { - "type": "const char*", - "name": "mode", - "desc": "打开方式,取值请参考POSIX的[fopen函数](https://www.runoob.com/cprogramming/c-function-fopen.html)相应的参数。" - } - ], - "annotation": {}, - "desc": "打开文件。", - "name": "fs_open_file", - "return": { - "type": "ret_t", - "desc": "返回非NULL表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "fs_t*", - "name": "fs", - "desc": "文件系统对象,一般赋值为os_fs()。" - }, - { - "type": "const char*", - "name": "name", - "desc": "文件名。" - } - ], - "annotation": {}, - "desc": "刪除文件。", - "name": "fs_remove_file", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "fs_t*", - "name": "fs", - "desc": "文件系统对象,一般赋值为os_fs()。" - }, - { - "type": "const char*", - "name": "name", - "desc": "文件名。" - } - ], - "annotation": {}, - "desc": "判断文件是否存在。", - "name": "fs_file_exist", - "return": { - "type": "bool_t", - "desc": "返回TRUE表示存在,否则表示不存在。" - } - }, - { - "params": [ - { - "type": "fs_t*", - "name": "fs", - "desc": "文件系统对象,一般赋值为os_fs()。" - }, - { - "type": "const char*", - "name": "name", - "desc": "旧文件名。" - }, - { - "type": "const char*", - "name": "new_name", - "desc": "新文件名。" - } - ], - "annotation": {}, - "desc": "文件重命名。", - "name": "fs_file_rename", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "fs_t*", - "name": "fs", - "desc": "文件系统对象,一般赋值为os_fs()。" - }, - { - "type": "const char*", - "name": "name", - "desc": "目录名称。" - } - ], - "annotation": {}, - "desc": "打开目录。", - "name": "fs_open_dir", - "return": { - "type": "fs_dir_t", - "desc": "返回非NULL表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "fs_t*", - "name": "fs", - "desc": "文件系统对象,一般赋值为os_fs()。" - }, - { - "type": "const char*", - "name": "name", - "desc": "目录名称。" - } - ], - "annotation": {}, - "desc": "修改当前目录。", - "name": "fs_change_dir", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "fs_t*", - "name": "fs", - "desc": "文件系统对象,一般赋值为os_fs()。" - }, - { - "type": "const char*", - "name": "name", - "desc": "目录名称。" - } - ], - "annotation": {}, - "desc": "创建目录。", - "name": "fs_create_dir", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "fs_t*", - "name": "fs", - "desc": "文件系统对象,一般赋值为os_fs()。" - }, - { - "type": "const char*", - "name": "name", - "desc": "目录名称。" - } - ], - "annotation": {}, - "desc": "刪除目录。", - "name": "fs_remove_dir", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "fs_t*", - "name": "fs", - "desc": "文件系统对象,一般赋值为os_fs()。" - }, - { - "type": "const char*", - "name": "name", - "desc": "目录名称。" - } - ], - "annotation": {}, - "desc": "递归创建目录。", - "name": "fs_create_dir_r", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "fs_t*", - "name": "fs", - "desc": "文件系统对象,一般赋值为os_fs()。" - }, - { - "type": "const char*", - "name": "name", - "desc": "目录名称。" - } - ], - "annotation": {}, - "desc": "递归刪除目录。", - "name": "fs_remove_dir_r", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "fs_t*", - "name": "fs", - "desc": "文件系统对象,一般赋值为os_fs()。" - }, - { - "type": "const char*", - "name": "name", - "desc": "目录名称。" - } - ], - "annotation": {}, - "desc": "判断目录是否存在。", - "name": "fs_dir_exist", - "return": { - "type": "bool_t", - "desc": "返回TRUE表示存在,否则表示不存在。" - } - }, - { - "params": [ - { - "type": "fs_t*", - "name": "fs", - "desc": "文件系统对象,一般赋值为os_fs()。" - }, - { - "type": "const char*", - "name": "name", - "desc": "旧目录名称。" - }, - { - "type": "const char*", - "name": "new_name", - "desc": "新目录名称。" - } - ], - "annotation": {}, - "desc": "目录重命名。", - "name": "fs_dir_rename", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "fs_t*", - "name": "fs", - "desc": "文件系统对象,一般赋值为os_fs()。" - }, - { - "type": "const char*", - "name": "name", - "desc": "文件名。" - } - ], - "annotation": {}, - "desc": "获取文件大小。", - "name": "fs_get_file_size", - "return": { - "type": "ret_t", - "desc": "返回不是-1表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "fs_t*", - "name": "fs", - "desc": "文件系统对象,一般赋值为os_fs()。" - }, - { - "type": "const char*", - "name": "value", - "desc": "卷名。" - }, - { - "type": "int32_t*", - "name": "free_kb", - "desc": "用于返回空闲空间大小(KB)" - }, - { - "type": "int32_t*", - "name": "total_kb", - "desc": "用于返回总共空间大小(KB)" - } - ], - "annotation": {}, - "desc": "获取文件系统信息。", - "name": "fs_get_disk_info", - "return": { - "type": "ret_t", - "desc": "返回不是-1表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "fs_t*", - "name": "fs", - "desc": "文件系统对象,一般赋值为os_fs()。" - }, - { - "type": "const char*", - "name": "name", - "desc": "文件名。" - }, - { - "type": "fs_stat_info_t*", - "name": "fst", - "desc": "文件状态信息。" - } - ], - "annotation": {}, - "desc": "获取文件信息。", - "name": "fs_stat", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "fs_t*", - "name": "fs", - "desc": "文件系统对象,一般赋值为os_fs()。" - }, - { - "type": "char*", - "name": "path", - "desc": "保存可执行文件的路径。" - } - ], - "annotation": {}, - "desc": "获取可执行文件所在目录。", - "name": "fs_get_exe", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "fs_t*", - "name": "fs", - "desc": "文件系统对象,一般赋值为os_fs()。" - }, - { - "type": "char*", - "name": "path", - "desc": "保存路径。" - } - ], - "annotation": {}, - "desc": "获取home目录或者应用程序可以写入数据的目录。", - "name": "fs_get_user_storage_path", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "fs_t*", - "name": "fs", - "desc": "文件系统对象,一般赋值为os_fs()。" - }, - { - "type": "char*", - "name": "path", - "desc": "保存路径。" - } - ], - "annotation": {}, - "desc": "获取临时目录。", - "name": "fs_get_temp_path", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "fs_t*", - "name": "fs", - "desc": "文件系统对象,一般赋值为os_fs()。" - }, - { - "type": "char*", - "name": "path", - "desc": "保存当前所在目录的路径。" - } - ], - "annotation": {}, - "desc": "获取当前所在目录。", - "name": "fs_get_cwd", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "char*", - "name": "filename", - "desc": "用于返回完整路径的文件名。" - }, - { - "type": "const char*", - "name": "appname", - "desc": "应用程序的名称。" - }, - { - "type": "const char*", - "name": "name", - "desc": "文件名(不包括路径)。" - } - ], - "annotation": {}, - "desc": "生成一个保存数据文件的完整路径的文件名。", - "name": "fs_build_user_storage_file_name", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [], - "annotation": { - "constructor": true - }, - "desc": "获取缺省的文件系统对象。", - "name": "os_fs", - "return": { - "type": "fs_t*", - "desc": "返回文件系统对象。" - } - }, - { - "params": [ - { - "type": "const char*", - "name": "name", - "desc": "文件名。" - } - ], - "annotation": {}, - "desc": "判断文件是否存在。", - "name": "file_exist", - "return": { - "type": "bool_t", - "desc": "返回TRUE表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "const char*", - "name": "name", - "desc": "文件名。" - } - ], - "annotation": {}, - "desc": "刪除文件。", - "name": "file_remove", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "const char*", - "name": "name", - "desc": "文件名。" - } - ], - "annotation": {}, - "desc": "获取文件大小。", - "name": "file_get_size", - "return": { - "type": "int32_t", - "desc": "返回非负表示文件大小,否则表示失败。" - } - }, - { - "params": [ - { - "type": "const char*", - "name": "name", - "desc": "文件名。" - }, - { - "type": "uint32_t*", - "name": "size", - "desc": "返回实际读取的长度。" - } - ], - "annotation": {}, - "desc": "读取文件的全部内容。", - "name": "file_read", - "return": { - "type": "void*", - "desc": "返回读取的数据,需要调用TKMEM_FREE释放。" - } - }, - { - "params": [ - { - "type": "const char*", - "name": "name", - "desc": "文件名。" - }, - { - "type": "const void*", - "name": "buffer", - "desc": "数据缓冲区。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "数据长度。" - }, - { - "type": "uint32_t", - "name": "offset", - "desc": "偏移量。" - } - ], - "annotation": {}, - "desc": "从某个位置读取文件。", - "name": "file_read_part", - "return": { - "type": "int32_t", - "desc": "返回实际读取的字节数。" - } - }, - { - "params": [ - { - "type": "const char*", - "name": "name", - "desc": "文件名。" - }, - { - "type": "const void*", - "name": "buffer", - "desc": "数据缓冲区。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "数据长度。" - } - ], - "annotation": {}, - "desc": "写入文件。", - "name": "file_write", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [], - "header": "tkc/fs.h", - "desc": "文件系统接口。", - "name": "fs_t", - "level": 1 - }, - { - "type": "class", - "methods": [], - "events": [], - "properties": [ - { - "name": "size", - "desc": "参数个数。", - "type": "uint16_t", - "annotation": { - "readable": true - } - }, - { - "name": "capacity", - "desc": "目前最大容量。", - "type": "uint16_t", - "annotation": { - "readable": true - } - }, - { - "name": "args", - "desc": "参数列表。", - "type": "value_t*", - "annotation": { - "readable": true - } - } - ], - "header": "tkc/fscript.h", - "desc": "扩展函数的参数。", - "name": "fscript_args_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "object_t*", - "name": "obj", - "desc": "脚本执行上下文。" - }, - { - "type": "const char*", - "name": "script", - "desc": "脚本代码。" - } - ], - "annotation": {}, - "desc": "创建引擎对象。", - "name": "fscript_create", - "return": { - "type": "fscript_t*", - "desc": "返回fscript对象。" - } - }, - { - "params": [ - { - "type": "fscript_t*", - "name": "fscript", - "desc": "脚本引擎对象。" - }, - { - "type": "value_t*", - "name": "result", - "desc": "执行结果(调用者需要用value_reset函数清除result)。" - } - ], - "annotation": {}, - "desc": "", - "name": "fscript_exec", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "fscript_t*", - "name": "fscript", - "desc": "脚本引擎对象。" - } - ], - "annotation": {}, - "desc": "销毁引擎对象。", - "name": "fscript_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "object_t*", - "name": "obj", - "desc": "脚本执行上下文。" - }, - { - "type": "const char*", - "name": "script", - "desc": "脚本代码。" - }, - { - "type": "value_t*", - "name": "result", - "desc": "执行结果(调用者需要用value_reset函数清除result)。" - } - ], - "annotation": {}, - "desc": "执行一段脚本。", - "name": "fscript_eval", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [], - "annotation": {}, - "desc": "全局初始化。", - "name": "fscript_global_init", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "const char*", - "name": "name", - "desc": "函数名(无需加函数前缀)。" - }, - { - "type": "fscript_func_t*", - "name": "func", - "desc": "函数指针。" - } - ], - "annotation": {}, - "desc": "注册全局自定义函数。", - "name": "fscript_register_func", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [], - "annotation": {}, - "desc": "全局释放。", - "name": "fscript_global_deinit", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [ - { - "name": "str", - "desc": "C语言实现函数可以使用这个变量,可以有效避免内存分配。", - "type": "str_t", - "annotation": { - "readable": true - } - }, - { - "name": "obj", - "desc": "脚本执行上下文。", - "type": "object_t*", - "annotation": { - "readable": true - } - }, - { - "name": "fast_vars", - "desc": "快速访问变量。在脚本可以用a/b/c/d来访问,需要优化时使用。", - "type": "value_t*", - "annotation": { - "readable": true - } - } - ], - "header": "tkc/fscript.h", - "desc": "一个简易的函数式脚本引擎。\n用法请参考:https://github.com/zlgopen/awtk/blob/master/docs/fscript.md", - "name": "fscript_t", - "annotation": { - "fake": true - }, - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "func_call_parser_t*", - "name": "parser", - "desc": "parser对象。" - }, - { - "type": "const char*", - "name": "str", - "desc": "要解析的字符串。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "字符串长度。" - } - ], - "annotation": { - "constructor": true - }, - "desc": "初始化parser对象。", - "name": "func_call_parser_init", - "return": { - "type": "func_call_parser_t*", - "desc": "parser对象本身。" - } - }, - { - "params": [ - { - "type": "func_call_parser_t*", - "name": "parser", - "desc": "parser对象。" - } - ], - "annotation": {}, - "desc": "开始解析。", - "name": "func_call_parser_parse", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "func_call_parser_t*", - "name": "parser", - "desc": "parser对象。" - } - ], - "annotation": {}, - "desc": "重置parser。", - "name": "func_call_parser_deinit", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "const char*", - "name": "str", - "desc": "要解析的字符串。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "字符串长度。" - } - ], - "annotation": {}, - "desc": "解析参数,并将结果生成一个object对象。\n\n> 调用者负责释放返回的object对象。", - "name": "func_call_parse", - "return": { - "type": "object_t*", - "desc": "返回object对象。" - } - } - ], - "events": [], - "properties": [], - "header": "tkc/func_call_parser.h", - "desc": "从字符串中解析出函数调用需要的参数。\n\n```\nfunc_call => func_name '(' params ')'\nparams => param ',' params\nparam => name '=' value\nfunc_name => ID\nname = ID\nvalue = int | float | ID\n```\n\n如:move(x=10, y=20)\n如:rename(old_name=aa, new_name=bb)", - "name": "func_call_parser_t", - "level": 1 - }, - { - "type": "class", - "methods": [], - "events": [], - "properties": [ - { - "name": "name", - "desc": "名称。", - "type": "const char*", - "annotation": { - "readable": true - } - }, - { - "name": "desc", - "desc": "描述。", - "type": "const char*", - "annotation": { - "readable": true - } - }, - { - "name": "exec", - "desc": "函数指针。", - "type": "func_exec_t", - "annotation": { - "readable": true - } - }, - { - "name": "args", - "desc": "函数参数描述。", - "type": "arg_desc_t**", - "annotation": { - "readable": true - } - }, - { - "name": "return_value", - "desc": "函数返回值描述。", - "type": "value_desc_t*", - "annotation": { - "readable": true - } - } - ], - "header": "tkc/func_desc.h", - "desc": "函数描述。", - "name": "func_desc_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [], - "annotation": { - "constructor": true - }, - "desc": "获取缺省的idle_manager_t管理器。", - "name": "idle_manager", - "return": { - "type": "idle_manager_t*", - "desc": "返回idle_manager_t管理器对象。" - } - }, - { - "params": [ - { - "type": "idle_manager_t*", - "name": "idle_manager_t", - "desc": "idle_manager_t管理器对象。" - } - ], - "annotation": {}, - "desc": "设置缺省的idle_manager_t管理器。", - "name": "idle_manager_set", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [], - "annotation": { - "constructor": true - }, - "desc": "创建idle_manager_t管理器。", - "name": "idle_manager_create", - "return": { - "type": "idle_manager_t*", - "desc": "返回idle_manager_t管理器对象。" - } - }, - { - "params": [ - { - "type": "idle_manager_t*", - "name": "idle_manager", - "desc": "idle_manager_t管理器对象。" - } - ], - "annotation": { - "constructor": true - }, - "desc": "初始化idle_manager_t管理器。", - "name": "idle_manager_init", - "return": { - "type": "idle_manager_t*", - "desc": "返回idle_manager_t管理器对象。" - } - }, - { - "params": [ - { - "type": "idle_manager_t*", - "name": "idle_manager", - "desc": "idle_manager_t管理器对象。" - } - ], - "annotation": {}, - "desc": "析构idle_manager_t管理器。", - "name": "idle_manager_deinit", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "idle_manager_t*", - "name": "idle_manager", - "desc": "idle_manager_t管理器对象。" - } - ], - "annotation": {}, - "desc": "析构并释放idle_manager_t管理器。", - "name": "idle_manager_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "idle_manager_t*", - "name": "idle_manager", - "desc": "idle_manager_t管理器对象。" - } - ], - "annotation": {}, - "desc": "返回idle的个数。", - "name": "idle_manager_count", - "return": { - "type": "uint32_t", - "desc": "返回timer的个数。" - } - }, - { - "params": [ - { - "type": "idle_manager_t*", - "name": "idle_manager", - "desc": "idle_manager_t管理器对象。" - } - ], - "annotation": {}, - "desc": "删除全部idle。", - "name": "idle_manager_remove_all", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "idle_manager_t*", - "name": "idle_manager", - "desc": "idle_manager_t管理器对象。" - }, - { - "type": "uint32_t", - "name": "idle_id", - "desc": "idle_id。" - } - ], - "annotation": {}, - "desc": "根据idle_id删除idle。", - "name": "idle_manager_remove", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "idle_manager_t*", - "name": "idle_manager", - "desc": "idle_manager_t管理器对象。" - }, - { - "type": "idle_info_t*", - "name": "idle", - "desc": "idle对象。" - } - ], - "annotation": {}, - "desc": "追加idle。", - "name": "idle_manager_append", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "idle_manager_t*", - "name": "idle_manager", - "desc": "idle_manager_t管理器对象。" - }, - { - "type": "uint32_t", - "name": "idle_id", - "desc": "idle_id。" - } - ], - "annotation": {}, - "desc": "查找指定ID的idle。", - "name": "idle_manager_find", - "return": { - "type": "idle_info_t*", - "desc": "返回idle的信息。" - } - }, - { - "params": [ - { - "type": "idle_manager_t*", - "name": "idle_manager", - "desc": "idle_manager_t管理器对象。" - }, - { - "type": "idle_func_t*", - "name": "on_idle", - "desc": "idle回调函数。" - }, - { - "type": "void*", - "name": "ctx", - "desc": "idle回调函数的上下文。" - } - ], - "annotation": {}, - "desc": "添加idle。", - "name": "idle_manager_add", - "return": { - "type": "uint32_t", - "desc": "返回idle的ID,TK_INVALID_ID表示失败。" - } - } - ], - "events": [], - "properties": [], - "header": "tkc/idle_manager.h", - "desc": "idle_manager_t管理器。", - "name": "idle_manager_t", - "annotation": { - "scriptable": true - }, - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "const int_str_t*", - "name": "items", - "desc": "int_str_t数组。" - }, - { - "type": "int32_t", - "name": "name", - "desc": "name。" - } - ], - "annotation": {}, - "desc": "根据name获取对应的value。", - "name": "int_str_value", - "return": { - "type": "const char*", - "desc": "返回value。" - } - }, - { - "params": [ - { - "type": "const int_str_t*", - "name": "items", - "desc": "int_str_t数组。" - }, - { - "type": "const char*", - "name": "value", - "desc": "value。" - }, - { - "type": "int32_t", - "name": "defval", - "desc": "如果没有找到对应的name,则返回的defval默认值。" - } - ], - "annotation": {}, - "desc": "根据value获取对应的name。", - "name": "int_str_name", - "return": { - "type": "int32_t", - "desc": "返回name。" - } - } - ], - "events": [], - "properties": [], - "header": "tkc/int_str.h", - "desc": "数字-字符串类型。\n\n负责把一个数字映射成一个字符串。\n\n示例:\n\n```c\nstatic const int_str_t color_values[] = {{1, \"red\"}, {2, \"black\"}, {3, \"blue\"}, {4, \"white\"}};\nconst char* value = int_str_value(color_values, 3);\nint32_t name = int_str_name(color_values, \"blue\", 0);\nprintf(\"value = %s \\n\", value);\nprintf(\"name = %d \\n\", name);\n```", - "name": "int_str_t", - "annotation": { - "fake": true - }, - "level": 1 - }, - { - "type": "enum", - "desc": "LOG的级别。", - "consts": [ - { - "desc": "DEBUG", - "name": "LOG_LEVEL_DEBUG" - }, - { - "desc": "INFO", - "name": "LOG_LEVEL_INFO" - }, - { - "desc": "WARN", - "name": "LOG_LEVEL_WARN" - }, - { - "desc": "ERROR", - "name": "LOG_LEVEL_ERROR" - } - ], - "header": "tkc/log.h", - "name": "log_level_t", - "prefix": "LOG_LEVEL_", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [], - "annotation": {}, - "desc": "获取log的级别。", - "name": "log_get_log_level", - "return": { - "type": "log_level_t", - "desc": "返回log的级别。" - } - }, - { - "params": [ - { - "type": "log_level_t", - "name": "log_level", - "desc": "log的级别。" - } - ], - "annotation": {}, - "desc": "设置log的级别。", - "name": "log_set_log_level", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "const char*", - "name": "format", - "desc": "格式或信息。" - } - ], - "annotation": {}, - "desc": "输出调试信息。\n> 变参函数。\n\n```\nlog_debug(\"debug message\\n\");\n```", - "name": "log_debug", - "export": "none", - "return": { - "type": "void", - "desc": "无返回值。" - } - }, - { - "params": [ - { - "type": "const char*", - "name": "format", - "desc": "格式或信息。" - } - ], - "annotation": {}, - "desc": "输出参考信息。\n> 变参函数。\n\n```\nlog_info(\"info message\\n\");\n```", - "name": "log_info", - "export": "none", - "return": { - "type": "void", - "desc": "无返回值。" - } - }, - { - "params": [ - { - "type": "const char*", - "name": "format", - "desc": "格式或信息。" - } - ], - "annotation": {}, - "desc": "输出警告信息。\n> 变参函数。\n\n```\nlog_warn(\"warn message\\n\");\n```", - "name": "log_warn", - "export": "none", - "return": { - "type": "void", - "desc": "无返回值。" - } - }, - { - "params": [ - { - "type": "const char*", - "name": "format", - "desc": "格式或信息。" - } - ], - "annotation": {}, - "desc": "输出错误信息。\n> 变参函数。\n\n```\nlog_error(\"error message\\n\");\n```", - "name": "log_error", - "export": "none", - "return": { - "type": "void", - "desc": "无返回值。" - } - } - ], - "events": [], - "properties": [], - "header": "tkc/log.h", - "desc": "log。", - "name": "log_t", - "annotation": { - "fake": true - }, - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "matrix_t*", - "name": "m", - "desc": "矩阵对象。" - } - ], - "annotation": {}, - "desc": "初始化矩阵对象。", - "name": "matrix_init", - "return": { - "type": "matrix_t*", - "desc": "矩阵对象。" - } - }, - { - "params": [ - { - "type": "matrix_t*", - "name": "m", - "desc": "矩阵对象。" - } - ], - "annotation": {}, - "desc": "重置矩阵对象为单位矩阵。", - "name": "matrix_identity", - "return": { - "type": "matrix_t*", - "desc": "矩阵对象。" - } - }, - { - "params": [ - { - "type": "matrix_t*", - "name": "m", - "desc": "矩阵对象。" - } - ], - "annotation": {}, - "desc": "求矩阵的逆。", - "name": "matrix_invert", - "return": { - "type": "matrix_t*", - "desc": "矩阵对象。" - } - }, - { - "params": [ - { - "type": "matrix_t*", - "name": "m", - "desc": "矩阵对象。" - }, - { - "type": "float", - "name": "a0", - "desc": "a0" - }, - { - "type": "float", - "name": "a1", - "desc": "a1" - }, - { - "type": "float", - "name": "a2", - "desc": "a2" - }, - { - "type": "float", - "name": "a3", - "desc": "a3" - }, - { - "type": "float", - "name": "a4", - "desc": "a4" - }, - { - "type": "float", - "name": "a5", - "desc": "a5" - } - ], - "annotation": {}, - "desc": "设置矩阵的参数。", - "name": "matrix_set", - "return": { - "type": "matrix_t*", - "desc": "矩阵对象。" - } - }, - { - "params": [ - { - "type": "matrix_t*", - "name": "m", - "desc": "矩阵对象。" - }, - { - "type": "matrix_t*", - "name": "b", - "desc": "矩阵对象。" - } - ], - "annotation": {}, - "desc": "矩阵相乘。", - "name": "matrix_multiply", - "return": { - "type": "matrix_t*", - "desc": "矩阵对象。" - } - }, - { - "params": [ - { - "type": "matrix_t*", - "name": "m", - "desc": "矩阵对象。" - }, - { - "type": "float", - "name": "x", - "desc": "x" - }, - { - "type": "float", - "name": "y", - "desc": "y" - } - ], - "annotation": {}, - "desc": "平移。", - "name": "matrix_translate", - "return": { - "type": "matrix_t*", - "desc": "矩阵对象。" - } - }, - { - "params": [ - { - "type": "matrix_t*", - "name": "m", - "desc": "矩阵对象。" - }, - { - "type": "float", - "name": "sx", - "desc": "sx" - }, - { - "type": "float", - "name": "sy", - "desc": "sy" - } - ], - "annotation": {}, - "desc": "缩放。", - "name": "matrix_scale", - "return": { - "type": "matrix_t*", - "desc": "矩阵对象。" - } - }, - { - "params": [ - { - "type": "matrix_t*", - "name": "m", - "desc": "矩阵对象。" - }, - { - "type": "float", - "name": "rad", - "desc": "角度。" - } - ], - "annotation": {}, - "desc": "旋转。", - "name": "matrix_rotate", - "return": { - "type": "matrix_t*", - "desc": "矩阵对象。" - } - }, - { - "params": [ - { - "type": "matrix_t*", - "name": "m", - "desc": "矩阵对象。" - }, - { - "type": "xy_t", - "name": "x", - "desc": "x" - }, - { - "type": "xy_t", - "name": "y", - "desc": "y" - }, - { - "type": "xy_t*", - "name": "out_x", - "desc": "out_x" - }, - { - "type": "xy_t*", - "name": "out_y", - "desc": "out_y" - } - ], - "annotation": {}, - "desc": "对点进行变换。", - "name": "matrix_transform_point", - "return": { - "type": "matrix_t*", - "desc": "矩阵对象。" - } - } - ], - "events": [], - "properties": [], - "header": "tkc/matrix.h", - "desc": "2D矩阵对象。", - "name": "matrix_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "mem_allocator_t*", - "name": "allocator", - "desc": "allocator对象。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "内存的大小。" - }, - { - "type": "const char*", - "name": "", - "desc": "。" - }, - { - "type": "uint32_t", - "name": "line", - "desc": "分配内存的行数(用于调试)。" - } - ], - "annotation": {}, - "desc": "分配指定大小的内存。", - "name": "mem_allocator_alloc", - "export": "none", - "return": { - "type": "void*", - "desc": "成功返回内存块的地址,失败返回NULL。" - } - }, - { - "params": [ - { - "type": "mem_allocator_t*", - "name": "allocator", - "desc": "allocator对象。" - }, - { - "type": "void*", - "name": "ptr", - "desc": "原来内存的地址。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "内存的大小。" - }, - { - "type": "const char*", - "name": "", - "desc": "。" - }, - { - "type": "uint32_t", - "name": "line", - "desc": "分配内存的行数(用于调试)。" - } - ], - "annotation": {}, - "desc": "重新分配指定大小的内存。", - "name": "mem_allocator_realloc", - "export": "none", - "return": { - "type": "void*", - "desc": "成功返回内存块的地址,失败返回NULL。" - } - }, - { - "params": [ - { - "type": "mem_allocator_t*", - "name": "allocator", - "desc": "allocator对象。" - }, - { - "type": "void*", - "name": "ptr", - "desc": "内存的地址。" - } - ], - "annotation": {}, - "desc": "释放内存。", - "name": "mem_allocator_free", - "export": "none", - "return": { - "type": "void*", - "desc": "成功返回内存块的地址,失败返回NULL。" - } - }, - { - "params": [ - { - "type": "mem_allocator_t*", - "name": "allocator", - "desc": "allocator对象。" - } - ], - "annotation": {}, - "desc": "显示内存信息,用于调试。", - "name": "mem_allocator_dump", - "export": "none", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "mem_allocator_t*", - "name": "allocator", - "desc": "allocator对象。" - } - ], - "annotation": {}, - "desc": "销毁内存分配器。", - "name": "mem_allocator_destroy", - "export": "none", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [], - "header": "tkc/mem_allocator.h", - "desc": "内存分配接口。", - "name": "mem_allocator_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "uint32_t", - "name": "size", - "desc": "内存大小。" - } - ], - "annotation": { - "macro": true - }, - "desc": "分配一块内存。", - "name": "TKMEM_ALLOC", - "export": "tk_alloc", - "return": { - "type": "void*", - "desc": "成功返回内存块首地址,失败返回NULL。" - } - }, - { - "params": [ - { - "type": "uint32_t", - "name": "nmemb", - "desc": "内存块数量。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "每一块的大小。" - } - ], - "annotation": { - "macro": true - }, - "desc": "分配一块内存,并将内容清零。", - "name": "TKMEM_CALLOC", - "export": "tk_calloc", - "return": { - "type": "void*", - "desc": "成功返回内存块首地址,失败返回NULL。" - } - }, - { - "params": [ - { - "type": "void*", - "name": "p", - "desc": "原来的内存地址。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "每一块的大小。" - } - ], - "annotation": { - "macro": true - }, - "desc": "重新分配一块内存,如果原来的内存块大于等于需要的空间,直接返回原来的内存块。", - "name": "TKMEM_REALLOC", - "export": "tk_realloc", - "return": { - "type": "void*", - "desc": "成功返回内存块首地址,失败返回NULL。" - } - }, - { - "params": [ - { - "type": "void*", - "name": "p", - "desc": "内存地址。" - } - ], - "annotation": { - "macro": true - }, - "desc": "释放内存。", - "name": "TKMEM_FREE", - "export": "tk_free", - "return": { - "type": "void", - "desc": "无。" - } - }, - { - "params": [], - "annotation": {}, - "desc": "显示内存信息。", - "name": "tk_mem_dump", - "return": { - "type": "void", - "desc": "返回void。" - } - }, - { - "params": [ - { - "type": "void*", - "name": "buffer", - "desc": "内存地址。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "内存长度。" - } - ], - "annotation": {}, - "desc": "初始化内存。", - "name": "tk_mem_init", - "export": "none", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [], - "annotation": {}, - "desc": "初始化互斥和oom。", - "name": "tk_mem_init_stage2", - "export": "none", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [], - "annotation": {}, - "desc": "检查给定的地址是否是一个有效的heap地址。\n\n> 用于辅助发现内存问题。", - "name": "tk_mem_is_valid_addr", - "return": { - "type": "bool_t", - "desc": "返回FALSE一定是无效地址,返回TRUE在PC则不太确定。" - } - } - ], - "events": [], - "properties": [], - "header": "tkc/mem.h", - "desc": "内存管理相关的宏和函数。\n\n示例:\n\n```c\nchar* str = (char*)TKMEM_ALLOC(100);\n...\nTKMEM_FREE(str);\n```\n\n```c\nchar* str = (char*)TKMEM_ALLOC(100);\n...\nstr = (char*)TKMEM_REALLOC(str, 128);\n...\nTKMEM_FREE(str);\n```", - "name": "tk_mem_t", - "annotation": { - "fake": true - }, - "level": 1 - }, - { - "type": "enum", - "desc": "MIME_TYPE。", - "consts": [ - { - "desc": "\"application/envoy\"。", - "name": "MIME_TYPE_APPLICATION_ENVOY" - }, - { - "desc": "\"application/fractals\"。", - "name": "MIME_TYPE_APPLICATION_FRACTALS" - }, - { - "desc": "\"application/futuresplash\"。", - "name": "MIME_TYPE_APPLICATION_FUTURESPLASH" - }, - { - "desc": "\"application/hta\"。", - "name": "MIME_TYPE_APPLICATION_HTA" - }, - { - "desc": "\"application/json\"。", - "name": "MIME_TYPE_APPLICATION_JSON" - }, - { - "desc": "\"application/ubjson\"。", - "name": "MIME_TYPE_APPLICATION_UBJSON" - }, - { - "desc": "\"application/mac-binhex40\"。", - "name": "MIME_TYPE_APPLICATION_MAC_BINHEX40" - }, - { - "desc": "\"application/msword\"。", - "name": "MIME_TYPE_APPLICATION_MSWORD" - }, - { - "desc": "\"application/octet-stream\"。", - "name": "MIME_TYPE_APPLICATION_OCTET_STREAM" - }, - { - "desc": "\"application/oda\"。", - "name": "MIME_TYPE_APPLICATION_ODA" - }, - { - "desc": "\"application/olescript\"。", - "name": "MIME_TYPE_APPLICATION_OLESCRIPT" - }, - { - "desc": "\"application/pdf\"。", - "name": "MIME_TYPE_APPLICATION_PDF" - }, - { - "desc": "\"application/pics-rules\"。", - "name": "MIME_TYPE_APPLICATION_PICS_RULES" - }, - { - "desc": "\"application/pkcs10\"。", - "name": "MIME_TYPE_APPLICATION_PKCS10" - }, - { - "desc": "\"application/pkix-crl\"。", - "name": "MIME_TYPE_APPLICATION_PKIX_CRL" - }, - { - "desc": "\"application/postscript\"。", - "name": "MIME_TYPE_APPLICATION_POSTSCRIPT" - }, - { - "desc": "\"application/rtf\"。", - "name": "MIME_TYPE_APPLICATION_RTF" - }, - { - "desc": "\"application/vnd.ms-excel\"。", - "name": "MIME_TYPE_APPLICATION_VND_MS_EXCEL" - }, - { - "desc": "\"application/vnd.ms-outlook\"。", - "name": "MIME_TYPE_APPLICATION_VND_MS_OUTLOOK" - }, - { - "desc": "\"application/vnd.ms-pkicertstore\"。", - "name": "MIME_TYPE_APPLICATION_VND_MS_PKICERTSTORE" - }, - { - "desc": "\"application/vnd.ms-pkiseccat\"。", - "name": "MIME_TYPE_APPLICATION_VND_MS_PKISECCAT" - }, - { - "desc": "\"application/vnd.ms-pkistl\"。", - "name": "MIME_TYPE_APPLICATION_VND_MS_PKISTL" - }, - { - "desc": "\"application/vnd.ms-powerpoint\"。", - "name": "MIME_TYPE_APPLICATION_VND_MS_POWERPOINT" - }, - { - "desc": "\"application/vnd.ms-project\"。", - "name": "MIME_TYPE_APPLICATION_VND_MS_PROJECT" - }, - { - "desc": "\"application/vnd.ms-works\"。", - "name": "MIME_TYPE_APPLICATION_VND_MS_WORKS" - }, - { - "desc": "\"application/winhlp\"。", - "name": "MIME_TYPE_APPLICATION_WINHLP" - }, - { - "desc": "\"application/x-bcpio\"。", - "name": "MIME_TYPE_APPLICATION_X_BCPIO" - }, - { - "desc": "\"application/x-cdf\"。", - "name": "MIME_TYPE_APPLICATION_X_CDF" - }, - { - "desc": "\"application/x-compress\"。", - "name": "MIME_TYPE_APPLICATION_X_COMPRESS" - }, - { - "desc": "\"application/x-compressed\"。", - "name": "MIME_TYPE_APPLICATION_X_COMPRESSED" - }, - { - "desc": "\"application/x-cpio\"。", - "name": "MIME_TYPE_APPLICATION_X_CPIO" - }, - { - "desc": "\"application/x-csh\"。", - "name": "MIME_TYPE_APPLICATION_X_CSH" - }, - { - "desc": "\"application/x-director\"。", - "name": "MIME_TYPE_APPLICATION_X_DIRECTOR" - }, - { - "desc": "\"application/x-dvi\"。", - "name": "MIME_TYPE_APPLICATION_X_DVI" - }, - { - "desc": "\"application/x-gtar\"。", - "name": "MIME_TYPE_APPLICATION_X_GTAR" - }, - { - "desc": "\"application/x-gzip\"。", - "name": "MIME_TYPE_APPLICATION_X_GZIP" - }, - { - "desc": "\"application/x-hdf\"。", - "name": "MIME_TYPE_APPLICATION_X_HDF" - }, - { - "desc": "\"application/x-iphone\"。", - "name": "MIME_TYPE_APPLICATION_X_IPHONE" - }, - { - "desc": "\"application/x-javascript\"。", - "name": "MIME_TYPE_APPLICATION_X_JAVASCRIPT" - }, - { - "desc": "\"application/x-latex\"。", - "name": "MIME_TYPE_APPLICATION_X_LATEX" - }, - { - "desc": "\"application/x-msaccess\"。", - "name": "MIME_TYPE_APPLICATION_X_MSACCESS" - }, - { - "desc": "\"application/x-mscardfile\"。", - "name": "MIME_TYPE_APPLICATION_X_MSCARDFILE" - }, - { - "desc": "\"application/x-msclip\"。", - "name": "MIME_TYPE_APPLICATION_X_MSCLIP" - }, - { - "desc": "\"application/x-msdownload\"。", - "name": "MIME_TYPE_APPLICATION_X_MSDOWNLOAD" - }, - { - "desc": "\"application/x-msmediaview\"。", - "name": "MIME_TYPE_APPLICATION_X_MSMEDIAVIEW" - }, - { - "desc": "\"application/x-msmetafile\"。", - "name": "MIME_TYPE_APPLICATION_X_MSMETAFILE" - }, - { - "desc": "\"application/x-msmoney\"。", - "name": "MIME_TYPE_APPLICATION_X_MSMONEY" - }, - { - "desc": "\"application/x-mspublisher\"。", - "name": "MIME_TYPE_APPLICATION_X_MSPUBLISHER" - }, - { - "desc": "\"application/x-msschedule\"。", - "name": "MIME_TYPE_APPLICATION_X_MSSCHEDULE" - }, - { - "desc": "\"application/x-msterminal\"。", - "name": "MIME_TYPE_APPLICATION_X_MSTERMINAL" - }, - { - "desc": "\"application/x-mswrite\"。", - "name": "MIME_TYPE_APPLICATION_X_MSWRITE" - }, - { - "desc": "\"application/x-netcdf\"。", - "name": "MIME_TYPE_APPLICATION_X_NETCDF" - }, - { - "desc": "\"application/x-perfmon\"。", - "name": "MIME_TYPE_APPLICATION_X_PERFMON" - }, - { - "desc": "\"application/x-pkcs12\"。", - "name": "MIME_TYPE_APPLICATION_X_PKCS12" - }, - { - "desc": "\"application/x-sh\"。", - "name": "MIME_TYPE_APPLICATION_X_SH" - }, - { - "desc": "\"application/x-shar\"。", - "name": "MIME_TYPE_APPLICATION_X_SHAR" - }, - { - "desc": "\"application/x-shockwave-flash\"。", - "name": "MIME_TYPE_APPLICATION_X_SHOCKWAVE_FLASH" - }, - { - "desc": "\"application/x-stuffit\"。", - "name": "MIME_TYPE_APPLICATION_X_STUFFIT" - }, - { - "desc": "\"application/x-sv4cpio\"。", - "name": "MIME_TYPE_APPLICATION_X_SV4CPIO" - }, - { - "desc": "\"application/x-sv4crc\"。", - "name": "MIME_TYPE_APPLICATION_X_SV4CRC" - }, - { - "desc": "\"application/x-tar\"。", - "name": "MIME_TYPE_APPLICATION_X_TAR" - }, - { - "desc": "\"application/x-tcl\"。", - "name": "MIME_TYPE_APPLICATION_X_TCL" - }, - { - "desc": "\"application/x-tex\"。", - "name": "MIME_TYPE_APPLICATION_X_TEX" - }, - { - "desc": "\"application/x-texinfo\"。", - "name": "MIME_TYPE_APPLICATION_X_TEXINFO" - }, - { - "desc": "\"application/x-troff\"。", - "name": "MIME_TYPE_APPLICATION_X_TROFF" - }, - { - "desc": "\"application/x-ustar\"。", - "name": "MIME_TYPE_APPLICATION_X_USTAR" - }, - { - "desc": "\"application/zip\"。", - "name": "MIME_TYPE_APPLICATION_ZIP" - }, - { - "desc": "\"audio/basic\"。", - "name": "MIME_TYPE_AUDIO_BASIC" - }, - { - "desc": "\"audio/mid\"。", - "name": "MIME_TYPE_AUDIO_MID" - }, - { - "desc": "\"audio/mpeg\"。", - "name": "MIME_TYPE_AUDIO_MPEG" - }, - { - "desc": "\"audio/x-aiff\"。", - "name": "MIME_TYPE_AUDIO_X_AIFF" - }, - { - "desc": "\"audio/x-mpegurl\"。", - "name": "MIME_TYPE_AUDIO_X_MPEGURL" - }, - { - "desc": "\"audio/x-wav\"。", - "name": "MIME_TYPE_AUDIO_X_WAV" - }, - { - "desc": "\"image/bmp\"。", - "name": "MIME_TYPE_IMAGE_BMP" - }, - { - "desc": "\"image/cis-cod\"。", - "name": "MIME_TYPE_IMAGE_CIS_COD" - }, - { - "desc": "\"image/gif\"。", - "name": "MIME_TYPE_IMAGE_GIF" - }, - { - "desc": "\"image/ief\"。", - "name": "MIME_TYPE_IMAGE_IEF" - }, - { - "desc": "\"image/jpeg\"。", - "name": "MIME_TYPE_IMAGE_JPEG" - }, - { - "desc": "\"image/pipeg\"。", - "name": "MIME_TYPE_IMAGE_PIPEG" - }, - { - "desc": "\"image/svg+xml\"。", - "name": "MIME_TYPE_IMAGE_SVG_XML" - }, - { - "desc": "\"image/tiff\"。", - "name": "MIME_TYPE_IMAGE_TIFF" - }, - { - "desc": "\"image/x-cmx\"。", - "name": "MIME_TYPE_IMAGE_X_CMX" - }, - { - "desc": "\"image/x-icon\"。", - "name": "MIME_TYPE_IMAGE_X_ICON" - }, - { - "desc": "\"image/x-rgb\"。", - "name": "MIME_TYPE_IMAGE_X_RGB" - }, - { - "desc": "\"image/x-xbitmap\"。", - "name": "MIME_TYPE_IMAGE_X_XBITMAP" - }, - { - "desc": "\"image/x-xpixmap\"。", - "name": "MIME_TYPE_IMAGE_X_XPIXMAP" - }, - { - "desc": "\"image/x-xwindowdump\"。", - "name": "MIME_TYPE_IMAGE_X_XWINDOWDUMP" - }, - { - "desc": "\"message/rfc822\"。", - "name": "MIME_TYPE_MESSAGE_RFC822" - }, - { - "desc": "\"text/css\"。", - "name": "MIME_TYPE_TEXT_CSS" - }, - { - "desc": "\"text/h323\"。", - "name": "MIME_TYPE_TEXT_H323" - }, - { - "desc": "\"text/html\"。", - "name": "MIME_TYPE_TEXT_HTML" - }, - { - "desc": "\"text/iuls\"。", - "name": "MIME_TYPE_TEXT_IULS" - }, - { - "desc": "\"text/plain\"。", - "name": "MIME_TYPE_TEXT_PLAIN" - }, - { - "desc": "\"text/richtext\"。", - "name": "MIME_TYPE_TEXT_RICHTEXT" - }, - { - "desc": "\"text/scriptlet\"。", - "name": "MIME_TYPE_TEXT_SCRIPTLET" - }, - { - "desc": "\"text/webviewhtml\"。", - "name": "MIME_TYPE_TEXT_WEBVIEWHTML" - }, - { - "desc": "\"text/x-component\"。", - "name": "MIME_TYPE_TEXT_X_COMPONENT" - }, - { - "desc": "\"text/x-setext\"。", - "name": "MIME_TYPE_TEXT_X_SETEXT" - }, - { - "desc": "\"text/x-vcard\"。", - "name": "MIME_TYPE_TEXT_X_VCARD" - }, - { - "desc": "\"video/mpeg\"。", - "name": "MIME_TYPE_VIDEO_MPEG" - }, - { - "desc": "\"video/quicktime\"。", - "name": "MIME_TYPE_VIDEO_QUICKTIME" - }, - { - "desc": "\"video/x-msvideo\"。", - "name": "MIME_TYPE_VIDEO_X_MSVIDEO" - } - ], - "header": "tkc/mime_types.h", - "name": "MIME_TYPE", - "prefix": "MIME_TYPE_", - "annotation": { - "scriptable": true, - "string": true - }, - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "mmap_t*", - "name": "mmap", - "desc": "mmap对象。" - }, - { - "type": "const char*", - "name": "filename", - "desc": "文件名。" - }, - { - "type": "bool_t", - "name": "writable", - "desc": "是否可写。" - }, - { - "type": "bool_t", - "name": "shared", - "desc": "是否共享。" - } - ], - "annotation": { - "constructor": true - }, - "desc": "初始化mmap对象。", - "name": "mmap_create", - "return": { - "type": "mmap_t*", - "desc": "mmap对象本身。" - } - }, - { - "params": [ - { - "type": "mmap_t*", - "name": "mmap", - "desc": "mmap对象。" - } - ], - "annotation": {}, - "desc": "销毁mmap。", - "name": "mmap_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [ - { - "name": "data", - "desc": "内存地址。", - "type": "void*", - "annotation": { - "readable": true - } - }, - { - "name": "size", - "desc": "数据长度。", - "type": "uint32_t", - "annotation": { - "readable": true - } - } - ], - "header": "tkc/mmap.h", - "desc": "把文件内容映射到内存。", - "name": "mmap_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [], - "annotation": {}, - "desc": "创建嵌套互斥锁。", - "name": "tk_mutex_nest_create", - "return": { - "type": "tk_mutex_nest_t*", - "desc": "mutex_nest对象。" - } - }, - { - "params": [ - { - "type": "tk_mutex_nest_t*", - "name": "mutex_nest", - "desc": "mutex_nest对象。" - } - ], - "annotation": {}, - "desc": "加锁。", - "name": "tk_mutex_nest_lock", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "tk_mutex_nest_t*", - "name": "mutex_nest", - "desc": "mutex_nest对象。" - } - ], - "annotation": {}, - "desc": "尝试加锁。", - "name": "tk_mutex_nest_try_lock", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "tk_mutex_nest_t*", - "name": "mutex_nest", - "desc": "mutex_nest对象。" - } - ], - "annotation": {}, - "desc": "解锁。只允许解锁当前线程所加的锁。", - "name": "tk_mutex_nest_unlock", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "tk_mutex_nest_t*", - "name": "mutex_nest", - "desc": "mutex_nest对象。" - } - ], - "annotation": {}, - "desc": "销毁mutex_nest对象。", - "name": "tk_mutex_nest_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [], - "header": "tkc/mutex_nest.h", - "desc": "嵌套互斥锁。允许同一个线程多次加锁。", - "name": "tk_mutex_nest_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [], - "annotation": {}, - "desc": "创建mutex。", - "name": "tk_mutex_create", - "return": { - "type": "tk_mutex_t*", - "desc": "mutex对象。" - } - }, - { - "params": [ - { - "type": "tk_mutex_t*", - "name": "mutex", - "desc": "mutex对象。" - } - ], - "annotation": {}, - "desc": "加锁。", - "name": "tk_mutex_lock", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "tk_mutex_t*", - "name": "mutex", - "desc": "mutex对象。" - } - ], - "annotation": {}, - "desc": "尝试加锁。", - "name": "tk_mutex_try_lock", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "tk_mutex_t*", - "name": "mutex", - "desc": "mutex对象。" - } - ], - "annotation": {}, - "desc": "解锁。", - "name": "tk_mutex_unlock", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "tk_mutex_t*", - "name": "mutex", - "desc": "mutex对象。" - } - ], - "annotation": {}, - "desc": "销毁mutex对象。", - "name": "tk_mutex_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [], - "header": "tkc/mutex.h", - "desc": "互斥锁。", - "name": "tk_mutex_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [], - "annotation": { - "constructor": true, - "scriptable": true, - "gc": true - }, - "desc": "创建named_value对象。", - "name": "named_value_create", - "return": { - "type": "named_value_t*", - "desc": "返回named_value对象。" - } - }, - { - "params": [ - { - "type": "named_value_t*", - "name": "nv", - "desc": "named_value对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "名称。" - }, - { - "type": "const value_t*", - "name": "value", - "desc": "值。" - } - ], - "annotation": { - "constructor": true - }, - "desc": "初始化。", - "name": "named_value_init", - "return": { - "type": "ret_t", - "desc": "返回named_value对象。" - } - }, - { - "params": [ - { - "type": "named_value_t*", - "name": "nv", - "desc": "named_value对象。" - } - ], - "annotation": { - "cast": true, - "scriptable": true - }, - "desc": "转换为named_value对象(供脚本语言使用)。", - "name": "named_value_cast", - "return": { - "type": "named_value_t*", - "desc": "返回named_value对象。" - } - }, - { - "params": [ - { - "type": "named_value_t*", - "name": "nv", - "desc": "named_value对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "名称。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置名称。", - "name": "named_value_set_name", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "named_value_t*", - "name": "nv", - "desc": "named_value对象。" - }, - { - "type": "const value_t*", - "name": "value", - "desc": "值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置值。", - "name": "named_value_set_value", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "named_value_t*", - "name": "nv", - "desc": "named_value对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取值对象(主要给脚本语言使用)。", - "name": "named_value_get_value", - "return": { - "type": "value_t*", - "desc": "返回值对象。" - } - }, - { - "params": [ - { - "type": "named_value_t*", - "name": "nv", - "desc": "named_value对象。" - } - ], - "annotation": { - "deconstructor": true - }, - "desc": "重置named_value对象。", - "name": "named_value_deinit", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "named_value_t*", - "name": "nv", - "desc": "named_value对象。" - } - ], - "annotation": { - "deconstructor": true, - "scriptable": true, - "gc": true - }, - "desc": "销毁named_value对象。", - "name": "named_value_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [ - { - "name": "name", - "desc": "名称。", - "type": "char*", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "value", - "desc": "值。", - "type": "value_t", - "annotation": { - "readable": true - } - } - ], - "header": "tkc/named_value.h", - "desc": "命名的值。", - "name": "named_value_t", - "annotation": { - "scriptable": true - }, - "level": 1 - }, - { - "type": "enum", - "desc": "对象常见命令定义", - "consts": [ - { - "desc": "保存命令", - "name": "OBJECT_CMD_SAVE" - }, - { - "desc": "重新加载命令", - "name": "OBJECT_CMD_RELOAD" - }, - { - "desc": "和前一个属性交换位置\n>参数为属性的名称或路径。", - "name": "OBJECT_CMD_MOVE_UP" - }, - { - "desc": "和后一个属性交换位置\n>参数为属性的名称或路径。", - "name": "OBJECT_CMD_MOVE_DOWN" - }, - { - "desc": "删除属性。\n>参数为属性的名称或路径。", - "name": "OBJECT_CMD_REMOVE" - }, - { - "desc": "删除勾选的属性。\n>参数为属性的名称或路径。", - "name": "OBJECT_CMD_REMOVE_CHECKED" - }, - { - "desc": "清除全部属性。\n>参数为属性的名称或路径。", - "name": "OBJECT_CMD_CLEAR" - }, - { - "desc": "增加子项。\n>参数为属性的名称或路径。", - "name": "OBJECT_CMD_ADD" - }, - { - "desc": "显示对象详细信息。\n>参数为属性的名称或路径。", - "name": "OBJECT_CMD_DETAIL" - }, - { - "desc": "编辑子项。\n>参数为属性的名称或路径。", - "name": "OBJECT_CMD_EDIT" - } - ], - "header": "tkc/object.h", - "name": "object_cmd_t", - "prefix": "OBJECT_CMD_", - "annotation": { - "scriptable": true, - "string": true - }, - "level": 1 - }, - { - "type": "enum", - "desc": "对象常见属性定义", - "consts": [ - { - "desc": "属性的个数。", - "name": "OBJECT_PROP_SIZE" - }, - { - "desc": "属性是否勾选。", - "name": "OBJECT_PROP_CHECKED" - } - ], - "header": "tkc/object.h", - "name": "object_prop_t", - "prefix": "OBJECT_PROP_", - "annotation": { - "scriptable": true, - "string": true - }, - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "const char* path*", - "name": "path", - "desc": "路径。" - }, - { - "type": "char*", - "name": "result", - "desc": "用于返回文件名。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "缓冲区大小。" - } - ], - "annotation": {}, - "desc": "返回文件名。", - "name": "path_basename", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "const char* path*", - "name": "path", - "desc": "路径。" - }, - { - "type": "char*", - "name": "result", - "desc": "用于返回文件扩展名。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "缓冲区大小。" - } - ], - "annotation": {}, - "desc": "返回文件扩展名。", - "name": "path_extname", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "const char* path*", - "name": "path", - "desc": "路径。" - }, - { - "type": "char*", - "name": "result", - "desc": "用于返回目录。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "缓冲区大小。" - } - ], - "annotation": {}, - "desc": "返回目录。", - "name": "path_dirname", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "const char* path*", - "name": "path", - "desc": "路径。" - }, - { - "type": "char*", - "name": "result", - "desc": "用于返回规范后的路径。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "缓冲区大小。" - } - ], - "annotation": {}, - "desc": "规范路径字符形式。", - "name": "path_normalize", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "const char* path*", - "name": "path", - "desc": "路径。" - }, - { - "type": "char*", - "name": "result", - "desc": "用于返回绝对路径。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "缓冲区大小。" - } - ], - "annotation": {}, - "desc": "返回绝对路径。", - "name": "path_abs", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "const char* path*", - "name": "path", - "desc": "路径。" - } - ], - "annotation": {}, - "desc": "判断路径是否为绝对路径。", - "name": "path_is_abs", - "return": { - "type": "ret_t", - "desc": "返回FALSE表示不是绝对路径,否则表示是绝对路径。" - } - }, - { - "params": [ - { - "type": "char*", - "name": "result", - "desc": "用于返回路径。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "缓冲区大小。" - } - ], - "annotation": {}, - "desc": "构造路径。\n\n> 可变参数为字符串,以NULL参数结束。", - "name": "path_build", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "char*", - "name": "result", - "desc": "用于返回结果。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "缓冲区大小。" - }, - { - "type": "char*", - "name": "filename", - "desc": "原始文件路径。" - }, - { - "type": "char*", - "name": "basename", - "desc": "替换后的文件名。" - } - ], - "annotation": {}, - "desc": "替换文件名。", - "name": "path_replace_basename", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "char*", - "name": "result", - "desc": "用于返回结果。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "缓冲区大小。" - }, - { - "type": "char*", - "name": "filename", - "desc": "原始文件路径。" - }, - { - "type": "char*", - "name": "extname", - "desc": "替换后的文件扩展名。" - } - ], - "annotation": {}, - "desc": "替换文件扩展名。", - "name": "path_replace_extname", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "char*", - "name": "path", - "desc": "保存当前所在目录的路径。" - } - ], - "annotation": {}, - "desc": "获取当前所在目录。", - "name": "path_cwd", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "char*", - "name": "path", - "desc": "保存可执行文件所在目录。" - } - ], - "annotation": {}, - "desc": "获取可执行文件所在目录。", - "name": "path_exe", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "char*", - "name": "path", - "desc": "保存app所在目录。" - } - ], - "annotation": {}, - "desc": "获取app所在目录。", - "name": "path_app_root", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "const char*", - "name": "path", - "desc": "目录。" - } - ], - "annotation": {}, - "desc": "判断目录是否存在。", - "name": "path_exist", - "return": { - "type": "ret_t", - "desc": "返回TRUE表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [], - "header": "tkc/path.h", - "desc": "路径相关的工具函数。", - "name": "path_t", - "annotation": { - "fake": true - }, - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [], - "annotation": {}, - "desc": "获取当前时间(毫秒)。", - "name": "get_time_ms64", - "return": { - "type": "uint64_t", - "desc": "成功返回当前时间。" - } - }, - { - "params": [], - "annotation": {}, - "desc": "获取当前时间(微秒)。", - "name": "get_time_us64", - "return": { - "type": "uint64_t", - "desc": "成功返回当前时间。" - } - }, - { - "params": [ - { - "type": "uint32_t", - "name": "ms", - "desc": "睡眠时间(毫秒)。" - } - ], - "annotation": {}, - "desc": "睡眠指定时间。", - "name": "sleep_ms", - "return": { - "type": "void", - "desc": "无。" - } - }, - { - "params": [], - "annotation": {}, - "desc": "平台准备函数。", - "name": "platform_prepare", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [], - "header": "tkc/platform.h", - "desc": "平台接口,包括:获取时间、休眠等函数。", - "name": "platform_t", - "annotation": { - "fake": true - }, - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "const char*", - "name": "path", - "desc": "插件所在的目录。" - }, - { - "type": "plugin_get_init_func_name_t", - "name": "get_init", - "desc": "获取初始化函数的函数名。为NULL时使用\"init\"。" - }, - { - "type": "plugin_get_deinit_func_name_t", - "name": "get_deinit", - "desc": "获取~初始化函数的函数名。为NULL时使用\"deinit\"。" - } - ], - "annotation": {}, - "desc": "创建插件管理器。", - "name": "plugin_manager_create", - "return": { - "type": "plugin_manager_t*", - "desc": "动态链接库对象。" - } - }, - { - "params": [ - { - "type": "plugin_manager_t*", - "name": "plugin_manager", - "desc": "plugin_manager对象。" - } - ], - "annotation": {}, - "desc": "重新扫描目录中的插件,加载没有加载的插件。", - "name": "plugin_manager_refresh", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "plugin_manager_t*", - "name": "plugin_manager", - "desc": "plugin_manager对象。" - } - ], - "annotation": {}, - "desc": "卸载所有插件并重新加载。", - "name": "plugin_manager_reload", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "plugin_manager_t*", - "name": "plugin_manager", - "desc": "plugin_manager对象。" - } - ], - "annotation": {}, - "desc": "显示所有的插件。", - "name": "plugin_manager_dump", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "plugin_manager_t*", - "name": "plugin_manager", - "desc": "plugin_manager对象。" - }, - { - "type": "const char*", - "name": "lib_name", - "desc": "动态库的名称。" - } - ], - "annotation": {}, - "desc": "检查指定的插件是否存在。", - "name": "plugin_manager_exist", - "return": { - "type": "bool_t", - "desc": "返回TRUE表示存在,否则表示不存在。" - } - }, - { - "params": [ - { - "type": "plugin_manager_t*", - "name": "plugin_manager", - "desc": "plugin_manager对象。" - } - ], - "annotation": {}, - "desc": "卸载全部插件,并销毁插件管理器对象。", - "name": "plugin_manager_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [], - "header": "tkc/plugin_manager.h", - "desc": "插件管理器。", - "name": "plugin_manager_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "qaction_exec_t", - "name": "exec", - "desc": "执行函数。" - }, - { - "type": "void*", - "name": "args", - "desc": "参数。" - }, - { - "type": "uint32_t", - "name": "args_size", - "desc": "参数长度。" - } - ], - "annotation": {}, - "desc": "创建action对象。", - "name": "qaction_create", - "return": { - "type": "qaction_t*", - "desc": "返回action对象。" - } - }, - { - "params": [ - { - "type": "qaction_t*", - "name": "action", - "desc": "action对象。" - }, - { - "type": "qaction_on_event_t", - "name": "on_event", - "desc": "事件处理函数。" - } - ], - "annotation": {}, - "desc": "设置事件处理函数(回调函数在后台线程执行)。\n\n> exec执行完成后,会触发EVT\\_DONE事件,一般在EVT\\_DONE事件中调用qaction\\_destroy函数销毁action。", - "name": "qaction_set_on_event", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "qaction_t*", - "name": "action", - "desc": "action对象。" - } - ], - "annotation": {}, - "desc": "执行。", - "name": "qaction_exec", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "qaction_t*", - "name": "action", - "desc": "action对象。" - }, - { - "type": "event_t**", - "name": "event", - "desc": "event对象。" - } - ], - "annotation": {}, - "desc": "事件通知。", - "name": "qaction_notify", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "qaction_t*", - "name": "q", - "desc": "qaction对象。" - } - ], - "annotation": {}, - "desc": "销毁。", - "name": "qaction_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [ - { - "name": "exec", - "desc": "执行函数。", - "type": "qaction_exec_t", - "annotation": { - "readable": true - } - }, - { - "name": "on_event", - "desc": "事件处理函数。如进度、错误和完成等。", - "type": "qaction_on_event_t", - "annotation": { - "readable": true - } - }, - { - "name": "args", - "desc": "exec的参数(视具体的action而不同)。", - "type": "uint32_t*", - "annotation": { - "readable": true - } - } - ], - "header": "tkc/qaction.h", - "desc": "代表一个action,放在action queue中。", - "name": "qaction_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "uint32_t", - "name": "init_capacity", - "desc": "初始容量。" - }, - { - "type": "uint32_t", - "name": "max_capacity", - "desc": "最大容量。" - } - ], - "annotation": { - "constructor": true - }, - "desc": "创建ring_buffer对象。", - "name": "ring_buffer_create", - "return": { - "type": "ring_buffer_t*", - "desc": "ring_buffer对象。" - } - }, - { - "params": [ - { - "type": "ring_buffer_t*", - "name": "ring_buffer", - "desc": "ring_buffer对象。" - } - ], - "annotation": {}, - "desc": "检查ring_buffer是否满。", - "name": "ring_buffer_is_full", - "return": { - "type": "bool_t", - "desc": "是否满。" - } - }, - { - "params": [ - { - "type": "ring_buffer_t*", - "name": "ring_buffer", - "desc": "ring_buffer对象。" - } - ], - "annotation": {}, - "desc": "检查ring_buffer是否空。", - "name": "ring_buffer_is_empty", - "return": { - "type": "bool_t", - "desc": "是否空。" - } - }, - { - "params": [ - { - "type": "ring_buffer_t*", - "name": "ring_buffer", - "desc": "ring_buffer对象。" - } - ], - "annotation": {}, - "desc": "获取数据长度。", - "name": "ring_buffer_size", - "return": { - "type": "uint32_t", - "desc": "数据长度。" - } - }, - { - "params": [ - { - "type": "ring_buffer_t*", - "name": "ring_buffer", - "desc": "ring_buffer对象。" - } - ], - "annotation": {}, - "desc": "获取空闲空间的长度。", - "name": "ring_buffer_free_size", - "return": { - "type": "uint32_t", - "desc": "空闲空间的长度。" - } - }, - { - "params": [ - { - "type": "ring_buffer_t*", - "name": "ring_buffer", - "desc": "ring_buffer对象。" - } - ], - "annotation": {}, - "desc": "获取容量。", - "name": "ring_buffer_capacity", - "return": { - "type": "uint32_t", - "desc": "容量。" - } - }, - { - "params": [ - { - "type": "ring_buffer_t*", - "name": "ring_buffer", - "desc": "ring_buffer对象。" - }, - { - "type": "void*", - "name": "buff", - "desc": "缓冲区。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "最大长度。" - } - ], - "annotation": {}, - "desc": "读取数据。", - "name": "ring_buffer_read", - "return": { - "type": "uint32_t", - "desc": "返回实际读取数据的长度。" - } - }, - { - "params": [ - { - "type": "ring_buffer_t*", - "name": "ring_buffer", - "desc": "ring_buffer对象。" - }, - { - "type": "void*", - "name": "buff", - "desc": "缓冲区。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "最大长度。" - } - ], - "annotation": {}, - "desc": "读取数据(不修改读取位置)。", - "name": "ring_buffer_peek", - "return": { - "type": "uint32_t", - "desc": "返回实际读取数据的长度。" - } - }, - { - "params": [ - { - "type": "ring_buffer_t*", - "name": "ring_buffer", - "desc": "ring_buffer对象。" - }, - { - "type": "const void*", - "name": "buff", - "desc": "缓冲区。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "最大长度。" - } - ], - "annotation": {}, - "desc": "写入数据。", - "name": "ring_buffer_write", - "return": { - "type": "uint32_t", - "desc": "返回实际写入数据的长度。" - } - }, - { - "params": [ - { - "type": "ring_buffer_t*", - "name": "ring_buffer", - "desc": "ring_buffer对象。" - }, - { - "type": "void*", - "name": "buff", - "desc": "缓冲区。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "最大长度。" - } - ], - "annotation": {}, - "desc": "读取指定长度数据,要么成功要么失败。", - "name": "ring_buffer_read_len", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "ring_buffer_t*", - "name": "ring_buffer", - "desc": "ring_buffer对象。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "长度。" - } - ], - "annotation": {}, - "desc": "跳过指定长度数据,要么成功要么失败。", - "name": "ring_buffer_skip", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "ring_buffer_t*", - "name": "ring_buffer", - "desc": "ring_buffer对象。" - }, - { - "type": "const void*", - "name": "buff", - "desc": "缓冲区。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "最大长度。" - } - ], - "annotation": {}, - "desc": "写入指定长度数据,要么成功要么失败。", - "name": "ring_buffer_write_len", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "ring_buffer_t*", - "name": "ring_buffer", - "desc": "ring_buffer对象。" - } - ], - "annotation": {}, - "desc": "重置ring_buffer为空。", - "name": "ring_buffer_reset", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "ring_buffer_t*", - "name": "ring_buffer", - "desc": "ring_buffer对象。" - }, - { - "type": "uint32_t", - "name": "r", - "desc": "读取光标的位置。" - } - ], - "annotation": {}, - "desc": "设置读取光标的位置。", - "name": "ring_buffer_set_read_cursor", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "ring_buffer_t*", - "name": "ring_buffer", - "desc": "ring_buffer对象。" - }, - { - "type": "uint32_t", - "name": "r_delta", - "desc": "读取光标的位置(delta)。" - } - ], - "annotation": {}, - "desc": "设置读取光标的位置(delta)。", - "name": "ring_buffer_set_read_cursor_delta", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "ring_buffer_t*", - "name": "ring_buffer", - "desc": "ring_buffer对象。" - }, - { - "type": "uint32_t", - "name": "w", - "desc": "写入光标的位置。" - } - ], - "annotation": {}, - "desc": "设置写入光标的位置。", - "name": "ring_buffer_set_write_cursor", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "ring_buffer_t*", - "name": "ring_buffer", - "desc": "ring_buffer对象。" - }, - { - "type": "uint32_t", - "name": "w_delta", - "desc": "写入光标的位置(delta)。" - } - ], - "annotation": {}, - "desc": "设置写入光标的位置(delta)。", - "name": "ring_buffer_set_write_cursor_delta", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "ring_buffer_t*", - "name": "ring_buffer", - "desc": "ring_buffer对象。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "需要的大小。" - } - ], - "annotation": {}, - "desc": "扩展buffer。", - "name": "ring_buffer_ensure_write_space", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "ring_buffer_t*", - "name": "ring_buffer", - "desc": "ring_buffer对象。" - } - ], - "annotation": {}, - "desc": "销毁ring_buffer。", - "name": "ring_buffer_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [ - { - "name": "r", - "desc": "读取位置。", - "type": "uint32_t", - "annotation": { - "readable": true - } - }, - { - "name": "w", - "desc": "写入位置。", - "type": "uint32_t", - "annotation": { - "readable": true - } - }, - { - "name": "full", - "desc": "是否满。", - "type": "bool_t", - "annotation": { - "readable": true - } - }, - { - "name": "capacity", - "desc": "当前容量。", - "type": "uint32_t", - "annotation": { - "readable": true - } - }, - { - "name": "max_capacity", - "desc": "最大容量。", - "type": "uint32_t", - "annotation": { - "readable": true - } - }, - { - "name": "data", - "desc": "数据。", - "type": "uint8_t*", - "annotation": { - "readable": true - } - } - ], - "header": "tkc/ring_buffer.h", - "desc": "循环缓存区。", - "name": "ring_buffer_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "const char*", - "name": "filename_pattern", - "desc": "用来确定文件名的路径和文件名。" - }, - { - "type": "uint32_t", - "name": "max_size", - "desc": "log文件占用最大磁盘空间(字节)。" - }, - { - "type": "uint32_t", - "name": "buff_size", - "desc": "用于指定print时的buff大小。" - } - ], - "annotation": { - "scriptable": true, - "constructor": true - }, - "desc": "创建rlog对象。\n\n```c\nrlog_t* log = rlog_create(\"./logs/%d.log\", 1020*1024, 256);\nrlog_write(log, \"hello\\n\");\nrlog_destroy(log);\n```", - "name": "rlog_create", - "return": { - "type": "rlog_t*", - "desc": "返回rlog对象。" - } - }, - { - "params": [ - { - "type": "rlog_t*", - "name": "log", - "desc": "日志对象。" - }, - { - "type": "const char*", - "name": "str", - "desc": "日志字符串。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "写入一条日志记录。", - "name": "rlog_write", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "rlog_t*", - "name": "log", - "desc": "日志对象。" - }, - { - "type": "const char*", - "name": "format", - "desc": "格式字符串。" - } - ], - "annotation": {}, - "desc": "写入一条日志记录。", - "name": "rlog_print", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "rlog_t*", - "name": "log", - "desc": "日志对象。" - } - ], - "annotation": {}, - "desc": "销毁日志对象。", - "name": "rlog_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [], - "header": "tkc/rlog.h", - "desc": "循环记录日志(支持多线程访问)。\n如果我们把日志写入文件中,随着时间的推移,日志文件会越来越大,最终占满这个磁盘,出现不可预料的错误。\nrlog提供一个循环记录日志的功能,让日志文件始终不会超出指定的大小,达到指定大小后再从头开始写。\n\n> 为了实现简单,我们把日志文件分成0和1两个文件,先写文件0,到达指定最大值的一半时,再写文件1。\n> 文件1到达指定最大值的一半时,删除文件0,并将文件1改名为文件0,重新创建文件1,继续写文件1,重复此过程。", - "name": "rlog_t", - "annotation": { - "scriptable": true - }, - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "const char*", - "name": "name", - "desc": "文件名。" - }, - { - "type": "const char*", - "name": "mode", - "desc": "打开方式。" - } - ], - "annotation": {}, - "desc": "打开文件。", - "name": "rom_fopen", - "return": { - "type": "ret_t", - "desc": "返回不是NULL表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "const uint8_t*", - "name": "data", - "desc": "数据。" - }, - { - "type": "uint32_t", - "name": "capacity", - "desc": "容量。" - } - ], - "annotation": {}, - "desc": "打开文件。", - "name": "rom_fopen_buff", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "rom_file_t*", - "name": "f", - "desc": "rom_file_t对象。" - } - ], - "annotation": {}, - "desc": "返回文件当前位置。", - "name": "rom_ftell", - "return": { - "type": "long", - "desc": "返回当前位置。" - } - }, - { - "params": [ - { - "type": "rom_file_t*", - "name": "f", - "desc": "rom_file_t对象。" - } - ], - "annotation": {}, - "desc": "判断是否到文件末尾。", - "name": "rom_feof", - "return": { - "type": "int", - "desc": "返回当前位置。" - } - }, - { - "params": [ - { - "type": "rom_file_t*", - "name": "f", - "desc": "rom_file_t对象。" - }, - { - "type": "long", - "name": "offset", - "desc": "偏移量。" - }, - { - "type": "int", - "name": "whence", - "desc": "要从哪个位置开始偏移, SEEK_SET表示从头开始,SEEK_CUR表示从当前位置开始,SEEK_END表示从文件末尾开始。" - } - ], - "annotation": {}, - "desc": "设置文件当前位置。", - "name": "rom_fseek", - "return": { - "type": "int", - "desc": "返回0表示成功。" - } - }, - { - "params": [ - { - "type": "void*", - "name": "ptr", - "desc": "数据的缓冲区。" - }, - { - "type": "size_t", - "name": "size", - "desc": "缓冲区大小。" - }, - { - "type": "size_t", - "name": "nitems", - "desc": "元素的个数。" - }, - { - "type": "rom_file_t*", - "name": "f", - "desc": "rom_file_t对象。" - } - ], - "annotation": {}, - "desc": "读取文件。", - "name": "rom_fread", - "return": { - "type": "size_t", - "desc": "返回实际读取的字节数。" - } - }, - { - "params": [ - { - "type": "void*", - "name": "ptr", - "desc": "数据的缓冲区。" - }, - { - "type": "size_t", - "name": "size", - "desc": "缓冲区大小。" - }, - { - "type": "size_t", - "name": "nitems", - "desc": "元素的个数。" - }, - { - "type": "rom_file_t*", - "name": "f", - "desc": "rom_file_t对象。" - } - ], - "annotation": {}, - "desc": "写文件。\n> 本函数什么也不做。", - "name": "rom_fwrite", - "return": { - "type": "size_t", - "desc": "返回实际写的字节数。" - } - }, - { - "params": [ - { - "type": "rom_file_t*", - "name": "f", - "desc": "rom_file_t对象。" - } - ], - "annotation": {}, - "desc": "关闭文件。", - "name": "rom_fclose", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [], - "header": "tkc/rom_fs.h", - "desc": "rom_file接口。\n\n> 主要用于给google pinyin输入提供兼容的文件系统API。\n\n示例:\n\n```c\nchar rbuff[100];\nsize_t len = 0;\nconst char* buff = \"hello world\";\nrom_file_t* f = rom_fopen_buff((const uint8_t*)buff, sizeof(buff));\nlen = rom_fread(rbuff, 2, 1, f);\nrom_fclose(f);\n```", - "name": "rom_t", - "annotation": { - "fake": true - }, - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "uint32_t", - "name": "value", - "desc": "初始值。" - }, - { - "type": "const char*", - "name": "name", - "desc": "名称。" - } - ], - "annotation": {}, - "desc": "创建信号量对象。", - "name": "tk_semaphore_create", - "return": { - "type": "tk_semaphore_t*", - "desc": "semaphore对象。" - } - }, - { - "params": [ - { - "type": "tk_semaphore_t*", - "name": "semaphore", - "desc": "信号量对象。" - }, - { - "type": "uint32_t", - "name": "timeout_ms", - "desc": "超时时间。" - } - ], - "annotation": {}, - "desc": "获取资源。", - "name": "tk_semaphore_wait", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "tk_semaphore_t*", - "name": "semaphore", - "desc": "信号量对象。" - } - ], - "annotation": {}, - "desc": "释放资源。", - "name": "tk_semaphore_post", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "tk_semaphore_t*", - "name": "semaphore", - "desc": "信号量对象。" - } - ], - "annotation": {}, - "desc": "销毁信号量对象。", - "name": "tk_semaphore_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [], - "header": "tkc/semaphore.h", - "desc": "信号量。", - "name": "tk_semaphore_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "tk_destroy_t", - "name": "destroy", - "desc": "元素销毁函数。" - }, - { - "type": "tk_compare_t", - "name": "compare", - "desc": "元素比较函数。" - } - ], - "annotation": { - "constructor": true - }, - "desc": "创建slist对象", - "name": "slist_create", - "return": { - "type": "slist_t*", - "desc": "单向链表对象。" - } - }, - { - "params": [ - { - "type": "slist_t*", - "name": "slist", - "desc": "单向链表对象。" - }, - { - "type": "tk_destroy_t", - "name": "destroy", - "desc": "元素销毁函数。" - }, - { - "type": "tk_compare_t", - "name": "compare", - "desc": "元素比较函数。" - } - ], - "annotation": {}, - "desc": "初始化slist对象", - "name": "slist_init", - "return": { - "type": "slist_t*", - "desc": "单向链表对象。" - } - }, - { - "params": [ - { - "type": "slist_t*", - "name": "slist", - "desc": "单向链表对象。" - }, - { - "type": "void*", - "name": "ctx", - "desc": "比较函数的上下文。" - } - ], - "annotation": {}, - "desc": "查找第一个满足条件的元素。", - "name": "slist_find", - "return": { - "type": "void*", - "desc": "如果找到,返回满足条件的对象,否则返回NULL。" - } - }, - { - "params": [ - { - "type": "slist_t*", - "name": "slist", - "desc": "单向链表对象。" - }, - { - "type": "void*", - "name": "ctx", - "desc": "比较函数的上下文。" - } - ], - "annotation": {}, - "desc": "删除第一个满足条件的元素。", - "name": "slist_remove", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "slist_t*", - "name": "slist", - "desc": "单向链表对象。" - } - ], - "annotation": {}, - "desc": "删除全部元素。", - "name": "slist_remove_all", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "slist_t*", - "name": "slist", - "desc": "单向链表对象。" - }, - { - "type": "void*", - "name": "data", - "desc": "待追加的元素。" - } - ], - "annotation": {}, - "desc": "在尾巴追加一个元素。", - "name": "slist_append", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "slist_t*", - "name": "slist", - "desc": "单向链表对象。" - }, - { - "type": "void*", - "name": "data", - "desc": "待追加的元素。" - } - ], - "annotation": {}, - "desc": "在头部追加一个元素。", - "name": "slist_prepend", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "slist_t*", - "name": "slist", - "desc": "单向链表对象。" - }, - { - "type": "tk_visit_t", - "name": "visit", - "desc": "遍历函数。" - }, - { - "type": "void*", - "name": "ctx", - "desc": "遍历函数的上下文。" - } - ], - "annotation": {}, - "desc": "遍历元素。", - "name": "slist_foreach", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "slist_t*", - "name": "slist", - "desc": "单向链表对象。" - } - ], - "annotation": {}, - "desc": "弹出最后一个元素。", - "name": "slist_tail_pop", - "return": { - "type": "ret_t", - "desc": "成功返回最后一个元素,失败返回NULL。" - } - }, - { - "params": [ - { - "type": "slist_t*", - "name": "slist", - "desc": "单向链表对象。" - } - ], - "annotation": {}, - "desc": "弹出第一个元素。", - "name": "slist_head_pop", - "return": { - "type": "ret_t", - "desc": "成功返回最后一个元素,失败返回NULL。" - } - }, - { - "params": [ - { - "type": "slist_t*", - "name": "slist", - "desc": "单向链表对象。" - } - ], - "annotation": {}, - "desc": "返回元素个数。", - "name": "slist_size", - "return": { - "type": "int32_t", - "desc": "返回元素个数。" - } - }, - { - "params": [ - { - "type": "slist_t*", - "name": "slist", - "desc": "单向链表对象。" - }, - { - "type": "void*", - "name": "ctx", - "desc": "比较函数的上下文。" - } - ], - "annotation": {}, - "desc": "返回满足条件元素的个数。", - "name": "slist_count", - "return": { - "type": "int32_t", - "desc": "返回元素个数。" - } - }, - { - "params": [ - { - "type": "slist_t*", - "name": "slist", - "desc": "单向链表对象。" - } - ], - "annotation": {}, - "desc": "清除单向链表中的元素。", - "name": "slist_deinit", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "slist_t*", - "name": "slist", - "desc": "单向链表对象。" - } - ], - "annotation": {}, - "desc": "清除单向链表中的元素,并释放单向链表对象。", - "name": "slist_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [ - { - "name": "first", - "desc": "首节点。", - "type": "slist_node_t*", - "annotation": { - "readable": true - } - }, - { - "name": "destroy", - "desc": "元素销毁函数。", - "type": "tk_destroy_t", - "annotation": { - "readable": true - } - }, - { - "name": "compare", - "desc": "元素比较函数。", - "type": "tk_compare_t", - "annotation": { - "readable": true - } - } - ], - "header": "tkc/slist.h", - "desc": "单向链表\n\n用slist\\_init初始化时,用slist\\_deinit释放。如:\n\n```c\nslist_t slist;\nslist_init(&slist, destroy, compare);\n...\nslist_deinit(&slist);\n```\n\n用slist\\_create创建时,用slist\\_destroy销毁。如:\n\n```c\nslist_t* slist = slist_create(destroy, compare);\n...\nslist_destroy(slist);\n```", - "name": "slist_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [], - "annotation": { - "static": true - }, - "desc": "tcp/udp 平台初始化。", - "name": "socket_init", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [], - "annotation": { - "static": true - }, - "desc": "tcp/udp 平台~初始化。", - "name": "socket_deinit", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "int", - "name": "sock", - "desc": "socket句柄。" - } - ], - "annotation": { - "static": true - }, - "desc": "关闭socket句柄。", - "name": "socket_close", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "int", - "name": "sock", - "desc": "socket句柄。" - }, - { - "type": "int", - "name": "port", - "desc": "端口号。" - } - ], - "annotation": { - "static": true - }, - "desc": "绑定到指定端口。", - "name": "socket_bind", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "int", - "name": "sock", - "desc": "socket句柄。" - }, - { - "type": "uint32_t", - "name": "timeout_ms", - "desc": "等待时间(ms)。" - } - ], - "annotation": { - "static": true - }, - "desc": "等待数据。", - "name": "socket_wait_for_data", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "int", - "name": "sock", - "desc": "socket句柄。" - }, - { - "type": "bool_t", - "name": "blocking", - "desc": "是否阻塞。" - } - ], - "annotation": { - "static": true - }, - "desc": "设置为阻塞或非阻塞模式。", - "name": "socket_set_blocking", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "int", - "name": "sock", - "desc": "socket句柄。" - }, - { - "type": "bool_t", - "name": "", - "desc": "g" - }, - { - "type": "struct sockaddr_in*", - "name": "addr", - "desc": "地址对象。" - } - ], - "annotation": { - "static": true - }, - "desc": "解析主机名,并初始化addr对象。", - "name": "socket_resolve", - "return": { - "type": "struct sockaddr*", - "desc": "返回地址对象。" - } - } - ], - "events": [], - "properties": [], - "header": "tkc/socket_helper.h", - "desc": "", - "name": "socket", - "annotation": { - "fake": true - }, - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "int", - "name": "port", - "desc": "端口号。" - } - ], - "annotation": { - "static": true - }, - "desc": "监听指定端口,成功返回sock句柄。", - "name": "tcp_listen", - "return": { - "type": "int", - "desc": "返回sock句柄。" - } - }, - { - "params": [ - { - "type": "int", - "name": "sock", - "desc": "socket句柄。" - } - ], - "annotation": { - "static": true - }, - "desc": "监听指定端口,成功返回sock句柄。", - "name": "tcp_accept", - "return": { - "type": "int", - "desc": "返回sock句柄。" - } - }, - { - "params": [ - { - "type": "const char*", - "name": "host", - "desc": "主机名或IP地址。" - }, - { - "type": "int", - "name": "port", - "desc": "端口号。" - } - ], - "annotation": { - "static": true - }, - "desc": "连接到指定服务器。", - "name": "tcp_connect", - "return": { - "type": "int", - "desc": "返回sock句柄。" - } - } - ], - "events": [], - "properties": [], - "header": "tkc/socket_helper.h", - "desc": "", - "name": "tcp_t", - "annotation": { - "fake": true - }, - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "int", - "name": "port", - "desc": "端口号。" - } - ], - "annotation": { - "static": true - }, - "desc": "监听指定端口,成功返回sock句柄。", - "name": "udp_listen", - "return": { - "type": "int", - "desc": "返回sock句柄。" - } - }, - { - "params": [ - { - "type": "const char*", - "name": "host", - "desc": "主机名或IP地址。" - }, - { - "type": "int", - "name": "port", - "desc": "端口号。" - } - ], - "annotation": { - "static": true - }, - "desc": "连接到指定服务器。", - "name": "udp_connect", - "return": { - "type": "int", - "desc": "返回sock句柄。" - } - } - ], - "events": [], - "properties": [], - "header": "tkc/socket_helper.h", - "desc": "", - "name": "udp_t", - "annotation": { - "fake": true - }, - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "int*", - "name": "socks", - "desc": "由于返回生成的socket句柄。" - } - ], - "annotation": {}, - "desc": "生成两个socket句柄。两者可以模拟客户端和服务器通信。", - "name": "tk_socketpair", - "return": { - "type": "int", - "desc": "小于0表示失败。" - } - } - ], - "events": [], - "properties": [], - "header": "tkc/socket_pair.h", - "desc": "socketpair", - "name": "socketpair_t", - "annotation": { - "fake": true - }, - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "const str_str_t*", - "name": "items", - "desc": "str_str_t数组。" - }, - { - "type": "const char*", - "name": "name", - "desc": "name。" - } - ], - "annotation": {}, - "desc": "根据name获取对应的value。", - "name": "str_str_value", - "return": { - "type": "const char*", - "desc": "返回value。" - } - }, - { - "params": [ - { - "type": "const str_str_t*", - "name": "items", - "desc": "str_str_t数组。" - }, - { - "type": "const char*", - "name": "value", - "desc": "value" - } - ], - "annotation": {}, - "desc": "根据value获取对应的name。", - "name": "str_str_name", - "return": { - "type": "const char*", - "desc": "返回name。" - } - } - ], - "events": [], - "properties": [], - "header": "tkc/str_str.h", - "desc": "字符串-字符串类型。\n\n负责把一个字符串映射成另外一个字符串。\n\n示例:\n\n```c\nstatic const str_str_t color_values[] = {{\"1\", \"red\"}, {\"2\", \"black\"}, {\"3\", \"blue\"}, {\"4\", \"white\"}};\nconst char* value = str_str_value(color_values, \"3\");\nconst char* name = str_str_name(color_values, \"blue\", \"0\");\nprintf(\"value = %s \\n\", value);\nprintf(\"name = %s \\n\", name);\n```", - "name": "str_str_t", - "annotation": { - "fake": true - }, - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "str_t*", - "name": "str", - "desc": "str对象。" - }, - { - "type": "uint32_t", - "name": "capacity", - "desc": "初始容量。" - } - ], - "annotation": { - "constructor": true - }, - "desc": "初始化字符串对象。", - "name": "str_init", - "return": { - "type": "str_t*", - "desc": "str对象本身。" - } - }, - { - "params": [ - { - "type": "str_t*", - "name": "str", - "desc": "str对象。" - }, - { - "type": "uint32_t", - "name": "capacity", - "desc": "初始容量。" - } - ], - "annotation": { - "constructor": true - }, - "desc": "扩展字符串到指定的容量。", - "name": "str_extend", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "str_t*", - "name": "str", - "desc": "str对象。" - }, - { - "type": "char*", - "name": "text", - "desc": "待比较的字符串。" - } - ], - "annotation": {}, - "desc": "判断两个字符串是否相等。", - "name": "str_eq", - "return": { - "type": "bool_t", - "desc": "返回是否相等。" - } - }, - { - "params": [ - { - "type": "str_t*", - "name": "str", - "desc": "str对象。" - }, - { - "type": "char*", - "name": "text", - "desc": "要设置的字符串。" - } - ], - "annotation": {}, - "desc": "设置字符串。", - "name": "str_set", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "str_t*", - "name": "str", - "desc": "str对象。" - } - ], - "annotation": {}, - "desc": "清除字符串内容。", - "name": "str_clear", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "str_t*", - "name": "str", - "desc": "str对象。" - }, - { - "type": "char*", - "name": "text", - "desc": "要设置的字符串。" - }, - { - "type": "uint32_t", - "name": "len", - "desc": "字符串长度。" - } - ], - "annotation": {}, - "desc": "设置字符串。", - "name": "str_set_with_len", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "str_t*", - "name": "str", - "desc": "str对象。" - }, - { - "type": "char*", - "name": "text", - "desc": "要追加的字符串。" - } - ], - "annotation": {}, - "desc": "追加字符串。", - "name": "str_append", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "str_t*", - "name": "str", - "desc": "str对象。" - }, - { - "type": "char*", - "name": "text", - "desc": "要追加的字符串。" - } - ], - "annotation": {}, - "desc": "追加多个字符串。以NULL结束。\n\n示例:\n\n```c\nstr_t s;\nstr_init(&s, 0);\n\nstr_append_more(&s, \"abc\", \"123\", NULL);\nlog_debug(\"%s\\n\", s.str);\n\nstr_reset(&s);\n```", - "name": "str_append_more", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "str_t*", - "name": "str", - "desc": "str对象。" - }, - { - "type": "char*", - "name": "text", - "desc": "要追加的字符串。" - }, - { - "type": "uint32_t", - "name": "len", - "desc": "字符串长度。" - } - ], - "annotation": {}, - "desc": "追加字符串。", - "name": "str_append_with_len", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "str_t*", - "name": "str", - "desc": "str对象。" - }, - { - "type": "uint32_t", - "name": "offset", - "desc": "偏移量。" - }, - { - "type": "char*", - "name": "text", - "desc": "要插入的字符串。" - } - ], - "annotation": {}, - "desc": "插入子字符串。", - "name": "str_insert", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "str_t*", - "name": "str", - "desc": "str对象。" - }, - { - "type": "uint32_t", - "name": "offset", - "desc": "偏移量。" - }, - { - "type": "char*", - "name": "text", - "desc": "要插入的字符串。" - }, - { - "type": "uint32_t", - "name": "len", - "desc": "字符串长度。" - } - ], - "annotation": {}, - "desc": "插入子字符串。", - "name": "str_insert_with_len", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "str_t*", - "name": "str", - "desc": "str对象。" - }, - { - "type": "uint32_t", - "name": "offset", - "desc": "偏移量。" - }, - { - "type": "uint32_t", - "name": "len", - "desc": "长度。" - } - ], - "annotation": {}, - "desc": "删除子字符串。", - "name": "str_remove", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "str_t*", - "name": "str", - "desc": "str对象。" - }, - { - "type": "char", - "name": "c", - "desc": "要追加的字符。" - } - ], - "annotation": {}, - "desc": "追加一个字符。", - "name": "str_append_char", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "str_t*", - "name": "str", - "desc": "str对象。" - }, - { - "type": "int32_t", - "name": "value", - "desc": "要追加的整数。" - } - ], - "annotation": {}, - "desc": "追加一个整数。", - "name": "str_append_int", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "str_t*", - "name": "str", - "desc": "str对象。" - }, - { - "type": "const char*", - "name": "format", - "desc": "格式。" - }, - { - "type": "double", - "name": "value", - "desc": "要追加的浮点数。" - } - ], - "annotation": {}, - "desc": "追加一个浮点数。", - "name": "str_append_double", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "str_t*", - "name": "str", - "desc": "str对象。" - }, - { - "type": "const char*", - "name": "json_str", - "desc": "待追加的字符串。" - } - ], - "annotation": {}, - "desc": "追加一个字符串,字符串前后加英文双引号,字符串本身的双引号被转义为\\\"。", - "name": "str_append_json_str", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "str_t*", - "name": "str", - "desc": "str对象。" - }, - { - "type": "const char*", - "name": "key", - "desc": "键。" - }, - { - "type": "int32_t", - "name": "value", - "desc": "值。" - } - ], - "annotation": {}, - "desc": "追加int格式的json键值对。", - "name": "str_append_json_int_pair", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "str_t*", - "name": "str", - "desc": "str对象。" - }, - { - "type": "const char*", - "name": "key", - "desc": "键。" - }, - { - "type": "const char*", - "name": "value", - "desc": "值。" - } - ], - "annotation": {}, - "desc": "追加字符串格式的json键值对。", - "name": "str_append_json_str_pair", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "str_t*", - "name": "str", - "desc": "str对象。" - }, - { - "type": "const char*", - "name": "key", - "desc": "键。" - }, - { - "type": "double", - "name": "value", - "desc": "值。" - } - ], - "annotation": {}, - "desc": "追加doube格式的json键值对。", - "name": "str_append_json_double_pair", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "str_t*", - "name": "str", - "desc": "str对象。" - }, - { - "type": "const char*", - "name": "key", - "desc": "键。" - }, - { - "type": "bool_t", - "name": "value", - "desc": "值。" - } - ], - "annotation": {}, - "desc": "追加bool格式的json键值对。", - "name": "str_append_json_bool_pair", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "str_t*", - "name": "str", - "desc": "str对象。" - } - ], - "annotation": {}, - "desc": "删除最后一个字符。", - "name": "str_pop", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "str_t*", - "name": "str", - "desc": "str对象。" - } - ], - "annotation": {}, - "desc": "对字符串进行反转义。如:把\"\\n\"转换成'\\n'。", - "name": "str_unescape", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "str_t*", - "name": "str", - "desc": "str对象。" - }, - { - "type": "char*", - "name": "text", - "desc": "要解码的XML文本。" - } - ], - "annotation": {}, - "desc": "对XML基本的entity进行解码,目前仅支持<>"a;&。", - "name": "str_decode_xml_entity", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "str_t*", - "name": "str", - "desc": "str对象。" - }, - { - "type": "char*", - "name": "text", - "desc": "要解码的XML文本。" - }, - { - "type": "uint32_t", - "name": "len", - "desc": "字符串长度。" - } - ], - "annotation": {}, - "desc": "对XML基本的entity进行解码,目前仅支持<>"a;&。", - "name": "str_decode_xml_entity_with_len", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "str_t*", - "name": "str", - "desc": "str对象。" - }, - { - "type": "int32_t", - "name": "v", - "desc": "整数。" - } - ], - "annotation": {}, - "desc": "用整数初始化字符串。", - "name": "str_from_int", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "str_t*", - "name": "str", - "desc": "str对象。" - }, - { - "type": "double", - "name": "v", - "desc": "浮点数。" - } - ], - "annotation": {}, - "desc": "用浮点数初始化字符串。", - "name": "str_from_float", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "str_t*", - "name": "str", - "desc": "str对象。" - }, - { - "type": "value_t", - "name": "v", - "desc": "value。" - } - ], - "annotation": {}, - "desc": "用value初始化字符串。", - "name": "str_from_value", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "str_t*", - "name": "str", - "desc": "str对象。" - }, - { - "type": "wchar_t*", - "name": "wstr", - "desc": "Unicode字符串。" - } - ], - "annotation": {}, - "desc": "用value初始化字符串。", - "name": "str_from_wstr", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "str_t*", - "name": "str", - "desc": "str对象。" - }, - { - "type": "wchar_t*", - "name": "wstr", - "desc": "Unicode字符串" - }, - { - "type": "uint32_t", - "name": "len", - "desc": "Unicode字符串的长度。" - } - ], - "annotation": {}, - "desc": "用value初始化字符串。", - "name": "str_from_wstr_with_len", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "str_t*", - "name": "str", - "desc": "str对象。" - }, - { - "type": "int32_t*", - "name": "v", - "desc": "用于返回整数。" - } - ], - "annotation": {}, - "desc": "将字符串转成整数。", - "name": "str_to_int", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "str_t*", - "name": "str", - "desc": "str对象。" - }, - { - "type": "double*", - "name": "v", - "desc": "用于返回浮点数。" - } - ], - "annotation": {}, - "desc": "将字符串转成浮点数。", - "name": "str_to_float", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "str_t*", - "name": "str", - "desc": "str对象。" - }, - { - "type": "const uint8_t*", - "name": "data", - "desc": "数据。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "数据长度。" - }, - { - "type": "const char*", - "name": "format", - "desc": "格式(如:\"%02x\" 表示生成小写)" - } - ], - "annotation": {}, - "desc": "把二进制的数据编码成16进制格式的字符串。", - "name": "str_encode_hex", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "str_t*", - "name": "str", - "desc": "str对象。" - }, - { - "type": "char*", - "name": "text", - "desc": "子字符串。" - } - ], - "annotation": {}, - "desc": "判断字符串是否以指定的子串结尾。", - "name": "str_end_with", - "return": { - "type": "bool_t", - "desc": "返回是否以指定的子串结尾。" - } - }, - { - "params": [ - { - "type": "str_t*", - "name": "str", - "desc": "str对象。" - }, - { - "type": "char*", - "name": "text", - "desc": "子字符串。" - } - ], - "annotation": {}, - "desc": "判断字符串是否以指定的子串开头。", - "name": "str_start_with", - "return": { - "type": "bool_t", - "desc": "返回是否以指定的子串开头。" - } - }, - { - "params": [ - { - "type": "str_t*", - "name": "str", - "desc": "str对象。" - }, - { - "type": "char*", - "name": "text", - "desc": "要去除的字符集合。" - } - ], - "annotation": {}, - "desc": "去除首尾指定的字符。", - "name": "str_trim", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "str_t*", - "name": "str", - "desc": "str对象。" - }, - { - "type": "char*", - "name": "text", - "desc": "要去除的字符集合。" - } - ], - "annotation": {}, - "desc": "去除首部指定的字符。", - "name": "str_trim_left", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "str_t*", - "name": "str", - "desc": "str对象。" - }, - { - "type": "char*", - "name": "text", - "desc": "要去除的字符集合。" - } - ], - "annotation": {}, - "desc": "去除尾部指定的字符。", - "name": "str_trim_right", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "str_t*", - "name": "str", - "desc": "str对象。" - }, - { - "type": "char*", - "name": "text", - "desc": "待替换的子串。" - }, - { - "type": "char*", - "name": "new_text", - "desc": "将替换成的子串。" - } - ], - "annotation": {}, - "desc": "字符串替换。", - "name": "str_replace", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "str_t*", - "name": "str", - "desc": "str对象。" - } - ], - "annotation": {}, - "desc": "将字符串转成小写。", - "name": "str_to_lower", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "str_t*", - "name": "str", - "desc": "str对象。" - } - ], - "annotation": {}, - "desc": "将字符串转成大写。", - "name": "str_to_upper", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "str_t*", - "name": "str", - "desc": "str对象。" - } - ], - "annotation": {}, - "desc": "将字符串中的变量展开为obj中对应的属性值。\n\n变量的格式为${xxx}:\n\n* xxx为变量名时,${xxx}被展开为obj的属性xxx的值。\n* xxx为表达式时,${xxx}被展开为表达式的值,表达式中可以用变量,$为变量的前缀,如${$x+$y}。\n* xxx为变量名时,而不存在obj的属性时,${xxx}被移出。", - "name": "str_expand_vars", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "str_t*", - "name": "str", - "desc": "str对象。" - } - ], - "annotation": {}, - "desc": "重置字符串为空。", - "name": "str_reset", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [ - { - "name": "size", - "desc": "长度。", - "type": "uint32_t", - "annotation": { - "readable": true - } - }, - { - "name": "capacity", - "desc": "容量。", - "type": "uint32_t", - "annotation": { - "readable": true - } - }, - { - "name": "str", - "desc": "字符串。", - "type": "char*", - "annotation": { - "readable": true - } - } - ], - "header": "tkc/str.h", - "desc": "可变长度的UTF8字符串。\n\n示例:\n\n```c\nstr_t s;\nstr_init(&s, 0);\n\nstr_append(&s, \"abc\");\nstr_append(&s, \"123\");\nlog_debug(\"%s\\n\", s.str);\n\nstr_reset(&s);\n```\n\n> 先调str\\_init进行初始化,最后调用str\\_reset释放内存。", - "name": "str_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "tk_thread_entry_t", - "name": "entry", - "desc": "线程函数。" - }, - { - "type": "void*", - "name": "args", - "desc": "线程函数的上下文。" - } - ], - "annotation": {}, - "desc": "创建thread对象。", - "name": "tk_thread_create", - "return": { - "type": "tk_thread_t*", - "desc": "thread对象。" - } - }, - { - "params": [ - { - "type": "tk_thread_t*", - "name": "thread", - "desc": "thread对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "名称。" - } - ], - "annotation": {}, - "desc": "设置线程的名称。\n\n> 需要在调用start之前调用本函数。", - "name": "tk_thread_set_name", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "tk_thread_t*", - "name": "thread", - "desc": "thread对象。" - }, - { - "type": "uint32_t", - "name": "stack_size", - "desc": "栈的大小。" - } - ], - "annotation": {}, - "desc": "设置线程的栈大小。\n\n> 需要在调用start之前调用本函数。", - "name": "tk_thread_set_stack_size", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "tk_thread_t*", - "name": "thread", - "desc": "thread对象。" - }, - { - "type": "uint32_t", - "name": "priority", - "desc": "优先级。" - } - ], - "annotation": {}, - "desc": "设置线程的优先级。\n\n> 部分平台支持。", - "name": "tk_thread_set_priority", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "tk_thread_t*", - "name": "thread", - "desc": "thread对象。" - } - ], - "annotation": {}, - "desc": "启动线程。", - "name": "tk_thread_start", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "tk_thread_t*", - "name": "thread", - "desc": "thread对象。" - } - ], - "annotation": {}, - "desc": "等待线程退出。\n必须调用 tk_thread_destroy 函数来释放线程资源,以免出现内存泄漏的问题。", - "name": "tk_thread_join", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "tk_thread_t*", - "name": "thread", - "desc": "thread对象。" - } - ], - "annotation": {}, - "desc": "获取线程的参数。", - "name": "tk_thread_get_args", - "return": { - "type": "void*", - "desc": "返回线程的参数。" - } - }, - { - "params": [ - { - "type": "tk_thread_t*", - "name": "thread", - "desc": "thread对象。" - } - ], - "annotation": {}, - "desc": "销毁thread对象。\n在销毁对象前必须调用 tk_thread_join 函数等待退出线程", - "name": "tk_thread_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [], - "annotation": {}, - "desc": "获取当前线程的原生句柄。", - "name": "tk_thread_self", - "return": { - "type": "uint64_t", - "desc": "返回当前线程的原生句柄。" - } - } - ], - "events": [], - "properties": [], - "header": "tkc/thread.h", - "desc": "线程对象。", - "name": "tk_thread_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [], - "annotation": { - "scriptable": true, - "static": true - }, - "desc": "获取当前时间(秒)。", - "name": "time_now_s", - "return": { - "type": "uint64_t", - "desc": "返回当前时间(秒)。" - } - }, - { - "params": [], - "annotation": { - "scriptable": true, - "static": true - }, - "desc": "获取当前时间(毫秒)。", - "name": "time_now_ms", - "return": { - "type": "uint64_t", - "desc": "返回当前时间(毫秒)。" - } - }, - { - "params": [], - "annotation": { - "scriptable": true, - "static": true - }, - "desc": "获取当前时间(微秒)。", - "name": "time_now_us", - "return": { - "type": "uint64_t", - "desc": "返回当前时间(微秒)。" - } - } - ], - "events": [], - "properties": [], - "header": "tkc/time_now.h", - "desc": "获取当前时间的函数。\n这里的当前时间是相对的,在嵌入式系统一般相对于开机时间。\n它本身并没有任何意义,一般用来计算时间间隔,如实现定时器和动画等等。", - "name": "time_now_t", - "annotation": { - "scriptable": true, - "fake": true - }, - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [], - "annotation": { - "constructor": true - }, - "desc": "获取缺省的定时器管理器。", - "name": "timer_manager", - "return": { - "type": "timer_manager_t*", - "desc": "返回定时器管理器对象。" - } - }, - { - "params": [ - { - "type": "timer_manager_t*", - "name": "timer_manager_t", - "desc": "定时器管理器对象。" - } - ], - "annotation": {}, - "desc": "设置缺省的定时器管理器。", - "name": "timer_manager_set", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "timer_get_time_t", - "name": "get_time", - "desc": "获取当前时间的函数。" - } - ], - "annotation": { - "constructor": true - }, - "desc": "创建定时器管理器。", - "name": "timer_manager_create", - "return": { - "type": "timer_manager_t*", - "desc": "返回定时器管理器对象。" - } - }, - { - "params": [ - { - "type": "timer_manager_t*", - "name": "timer_manager", - "desc": "定时器管理器对象。" - }, - { - "type": "timer_get_time_t", - "name": "get_time", - "desc": "获取当前时间的函数。" - } - ], - "annotation": { - "constructor": true - }, - "desc": "初始化定时器管理器。", - "name": "timer_manager_init", - "return": { - "type": "timer_manager_t*", - "desc": "返回定时器管理器对象。" - } - }, - { - "params": [ - { - "type": "timer_manager_t*", - "name": "timer_manager", - "desc": "定时器管理器对象。" - } - ], - "annotation": {}, - "desc": "析构定时器管理器。", - "name": "timer_manager_deinit", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "timer_manager_t*", - "name": "timer_manager", - "desc": "定时器管理器对象。" - } - ], - "annotation": {}, - "desc": "析构并释放定时器管理器。", - "name": "timer_manager_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "timer_manager_t*", - "name": "timer_manager", - "desc": "定时器管理器对象。" - }, - { - "type": "timer_func_t*", - "name": "on_timer", - "desc": "timer回调函数。" - }, - { - "type": "void*", - "name": "ctx", - "desc": "timer回调函数的上下文。" - }, - { - "type": "uint32_t", - "name": "duration", - "desc": "时间。" - } - ], - "annotation": {}, - "desc": "添加定时器。", - "name": "timer_manager_add", - "return": { - "type": "uint32_t", - "desc": "返回timer的ID,TK_INVALID_ID表示失败。" - } - }, - { - "params": [ - { - "type": "timer_manager_t*", - "name": "timer_manager", - "desc": "定时器管理器对象。" - }, - { - "type": "uint32_t", - "name": "timer_id", - "desc": "timer_id。" - } - ], - "annotation": {}, - "desc": "根据id删除定时器。", - "name": "timer_manager_remove", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "timer_manager_t*", - "name": "timer_manager", - "desc": "定时器管理器对象。" - }, - { - "type": "uint32_t*", - "name": "timer_id", - "desc": "timer_id。" - } - ], - "annotation": {}, - "desc": "重置定时器。", - "name": "timer_manager_reset", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "timer_manager_t*", - "name": "timer_manager", - "desc": "定时器管理器对象。" - }, - { - "type": "uint32_t", - "name": "timer_id", - "desc": "timer_id" - } - ], - "annotation": {}, - "desc": "查找指定ID的定时器。", - "name": "timer_manager_find", - "return": { - "type": "timer_info_t*", - "desc": "返回timer的信息。" - } - }, - { - "params": [ - { - "type": "timer_manager_t*", - "name": "timer_manager", - "desc": "定时器管理器对象。" - } - ], - "annotation": {}, - "desc": "返回定时器的个数。", - "name": "timer_manager_count", - "return": { - "type": "uint32_t", - "desc": "返回timer的个数。" - } - }, - { - "params": [ - { - "type": "timer_manager_t*", - "name": "timer_manager", - "desc": "定时器管理器对象。" - } - ], - "annotation": {}, - "desc": "返回最近的定时器到期时间。", - "name": "timer_manager_next_time", - "return": { - "type": "uint64_t", - "desc": "返回最近的timer到期时间。" - } - }, - { - "params": [ - { - "type": "timer_manager_t*", - "name": "timer_manager", - "desc": "定时器管理器对象。。" - }, - { - "type": "timer_info_t*", - "name": "timer", - "desc": "timer对象。" - } - ], - "annotation": {}, - "desc": "追加定时器。", - "name": "timer_manager_append", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [], - "header": "tkc/timer_manager.h", - "desc": "定时器管理器。", - "name": "timer_manager_t", - "annotation": { - "scriptable": true - }, - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "tokenizer_t*", - "name": "tokenizer", - "desc": "tokenizer对象。" - }, - { - "type": "char*", - "name": "str", - "desc": "要解析的字符串。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "字符串长度。" - }, - { - "type": "char*", - "name": "separtor", - "desc": "分隔字符。" - } - ], - "annotation": { - "constructor": true - }, - "desc": "初始化tokenizer对象。", - "name": "tokenizer_init", - "return": { - "type": "tokenizer_t*", - "desc": "tokenizer对象本身。" - } - }, - { - "params": [ - { - "type": "tokenizer_t*", - "name": "tokenizer", - "desc": "tokenizer对象。" - }, - { - "type": "char*", - "name": "str", - "desc": "要解析的字符串。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "字符串长度。" - }, - { - "type": "char*", - "name": "separtor", - "desc": "分隔字符。" - }, - { - "type": "char*", - "name": "single_char_token", - "desc": "单字符token。" - } - ], - "annotation": { - "constructor": true - }, - "desc": "初始化tokenizer对象。", - "name": "tokenizer_init_ex", - "return": { - "type": "tokenizer_t*", - "desc": "tokenizer对象本身。" - } - }, - { - "params": [ - { - "type": "tokenizer_t*", - "name": "tokenizer", - "desc": "tokenizer对象。" - } - ], - "annotation": {}, - "desc": "是否还有下一个token。", - "name": "tokenizer_has_more", - "return": { - "type": "bool_t", - "desc": "还有下一个token返回TRUE,否则返回FALSE。" - } - }, - { - "params": [ - { - "type": "tokenizer_t*", - "name": "tokenizer", - "desc": "tokenizer对象。" - } - ], - "annotation": {}, - "desc": "获取下一个token。", - "name": "tokenizer_next", - "return": { - "type": "char*", - "desc": "成功返回token,失败返回NULL。" - } - }, - { - "params": [ - { - "type": "tokenizer_t*", - "name": "tokenizer", - "desc": "tokenizer对象。" - }, - { - "type": "const char*", - "name": "str", - "desc": "字符集。" - } - ], - "annotation": {}, - "desc": "获取下一个token,该token直到遇到指定的char。", - "name": "tokenizer_next_until", - "return": { - "type": "char*", - "desc": "成功返回token,失败返回NULL。" - } - }, - { - "params": [ - { - "type": "tokenizer_t*", - "name": "tokenizer", - "desc": "tokenizer对象。" - }, - { - "type": "const char*", - "name": "str", - "desc": "字符集。" - } - ], - "annotation": {}, - "desc": "获取下一个expr,该expr直到遇到指定的char。", - "name": "tokenizer_next_expr_until", - "return": { - "type": "char*", - "desc": "成功返回token,失败返回NULL。" - } - }, - { - "params": [ - { - "type": "tokenizer_t*", - "name": "tokenizer", - "desc": "tokenizer对象。" - }, - { - "type": "int", - "name": "defval", - "desc": "缺省值。" - } - ], - "annotation": {}, - "desc": "获取下一个token,并转换成int。", - "name": "tokenizer_next_int", - "return": { - "type": "char*", - "desc": "成功返回token的int值,失败返回缺省值。" - } - }, - { - "params": [ - { - "type": "tokenizer_t*", - "name": "tokenizer", - "desc": "tokenizer对象。" - }, - { - "type": "float", - "name": "defval", - "desc": "缺省值。" - } - ], - "annotation": {}, - "desc": "获取下一个token,并转换成float。", - "name": "tokenizer_next_float", - "return": { - "type": "char*", - "desc": "成功返回token的float值,失败返回缺省值。" - } - }, - { - "params": [ - { - "type": "tokenizer_t*", - "name": "tokenizer", - "desc": "tokenizer对象。" - } - ], - "annotation": {}, - "desc": "重置tokenizer。", - "name": "tokenizer_deinit", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [ - { - "name": "str", - "desc": "字符串。", - "type": "char*", - "annotation": { - "readable": true - } - }, - { - "name": "size", - "desc": "字符串的长度。", - "type": "uint32_t", - "annotation": { - "readable": true - } - }, - { - "name": "cursor", - "desc": "当前位置。", - "type": "uint32_t", - "annotation": { - "readable": true - } - }, - { - "name": "separtor", - "desc": "分隔字符串。", - "type": "char*", - "annotation": { - "readable": true - } - }, - { - "name": "single_char_token", - "desc": "单字符的token。", - "type": "char*", - "annotation": { - "readable": true - } - } - ], - "header": "tkc/tokenizer.h", - "desc": "从字符串中解析出一个一个的token。\n\n```c\ntokenizer_t tokenizer;\ntokenizer_t* t = tokenizer_init(&tokenizer, \"20,111.2,22.3,333.3,44,555.5\", 0xffffff, \",\");\n\nwhile(tokenizer_has_more(t)) {\ndouble v = tokenizer_next_float(t, 0);\nlog_debug(\"%lf\\n\", v);\n}\n\ntokenizer_deinit(t);\n```", - "name": "tokenizer_t", - "level": 1 - }, - { - "type": "enum", - "desc": "函数返回值常量定义。", - "consts": [ - { - "desc": "成功。", - "name": "RET_OK" - }, - { - "desc": "Out of memory。", - "name": "RET_OOM" - }, - { - "desc": "失败。", - "name": "RET_FAIL" - }, - { - "desc": "没有实现/不支持。", - "name": "RET_NOT_IMPL" - }, - { - "desc": "退出。通常用于主循环。", - "name": "RET_QUIT" - }, - { - "desc": "找到。", - "name": "RET_FOUND" - }, - { - "desc": "对象忙。", - "name": "RET_BUSY" - }, - { - "desc": "移出。通常用于定时器。", - "name": "RET_REMOVE" - }, - { - "desc": "重复。通常用于定时器。", - "name": "RET_REPEAT" - }, - { - "desc": "没找到。", - "name": "RET_NOT_FOUND" - }, - { - "desc": "操作完成。", - "name": "RET_DONE" - }, - { - "desc": "停止后续操作。", - "name": "RET_STOP" - }, - { - "desc": "跳过当前项。", - "name": "RET_SKIP" - }, - { - "desc": "继续后续操作。", - "name": "RET_CONTINUE" - }, - { - "desc": "对象属性变化。", - "name": "RET_OBJECT_CHANGED" - }, - { - "desc": "集合数目变化。", - "name": "RET_ITEMS_CHANGED" - }, - { - "desc": "无效参数。", - "name": "RET_BAD_PARAMS" - }, - { - "desc": "超时。", - "name": "RET_TIMEOUT" - }, - { - "desc": "CRC错误。", - "name": "RET_CRC" - }, - { - "desc": "IO错误。", - "name": "RET_IO" - }, - { - "desc": "End of Stream", - "name": "RET_EOS" - }, - { - "desc": "没有改变。", - "name": "RET_NOT_MODIFIED" - } - ], - "header": "tkc/types_def.h", - "name": "ret_t", - "prefix": "RET_", - "annotation": { - "scriptable": true - }, - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "const char*", - "name": "surl", - "desc": "字符串格式的URL。" - } - ], - "annotation": {}, - "desc": "创建URL对象。", - "name": "url_create", - "return": { - "type": "url_t*", - "desc": "返回URL对象。" - } - }, - { - "params": [ - { - "type": "url_t*", - "name": "url", - "desc": "url对象。" - }, - { - "type": "const char*", - "name": "schema", - "desc": "schema。" - } - ], - "annotation": {}, - "desc": "设置schema。", - "name": "url_set_schema", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "url_t*", - "name": "url", - "desc": "url对象。" - }, - { - "type": "const char*", - "name": "user_name", - "desc": "用户名。" - } - ], - "annotation": {}, - "desc": "设置用户名。", - "name": "url_set_user_name", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "url_t*", - "name": "url", - "desc": "url对象。" - }, - { - "type": "const char*", - "name": "password", - "desc": "密码。" - } - ], - "annotation": {}, - "desc": "设置密码。", - "name": "url_set_password", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "url_t*", - "name": "url", - "desc": "url对象。" - }, - { - "type": "const char*", - "name": "host", - "desc": "主机名。" - } - ], - "annotation": {}, - "desc": "设置主机名。", - "name": "url_set_host", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "url_t*", - "name": "url", - "desc": "url对象。" - }, - { - "type": "int32_t", - "name": "port", - "desc": "端口。" - } - ], - "annotation": {}, - "desc": "设置端口。", - "name": "url_set_port", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "url_t*", - "name": "url", - "desc": "url对象。" - }, - { - "type": "const char*", - "name": "path", - "desc": "路径。" - } - ], - "annotation": {}, - "desc": "设置路径。", - "name": "url_set_path", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "url_t*", - "name": "url", - "desc": "url对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "参数名。" - }, - { - "type": "const char*", - "name": "value", - "desc": "参数值。" - } - ], - "annotation": {}, - "desc": "设置参数。", - "name": "url_set_param", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "url_t*", - "name": "url", - "desc": "url对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "参数名。" - } - ], - "annotation": {}, - "desc": "获取参数。", - "name": "url_get_param", - "return": { - "type": "const char*", - "desc": "返回指定参数名的参数值。" - } - }, - { - "params": [ - { - "type": "url_t*", - "name": "url", - "desc": "url对象。" - } - ], - "annotation": {}, - "desc": "销毁url对象。", - "name": "url_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [ - { - "name": "schema", - "desc": "schema。", - "type": "char*", - "annotation": { - "readable": true - } - }, - { - "name": "user_name", - "desc": "用户名。", - "type": "char*", - "annotation": { - "readable": true - } - }, - { - "name": "password", - "desc": "密码。", - "type": "char*", - "annotation": { - "readable": true - } - }, - { - "name": "host", - "desc": "主机名。", - "type": "char*", - "annotation": { - "readable": true - } - }, - { - "name": "path", - "desc": "路径。", - "type": "char*", - "annotation": { - "readable": true - } - }, - { - "name": "port", - "desc": "端口。", - "type": "int32_t", - "annotation": { - "readable": true - } - }, - { - "name": "params", - "desc": "参数集合。", - "type": "object_t*", - "annotation": { - "readable": true - } - } - ], - "header": "tkc/url.h", - "desc": "URL", - "name": "url_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "const wchar_t*", - "name": "in", - "desc": "输入字符串。" - }, - { - "type": "const char*", - "name": "out", - "desc": "输出字符串。" - }, - { - "type": "uint32_t", - "name": "out_size", - "desc": "输出字符串的最大长度。" - } - ], - "annotation": {}, - "desc": "把ucs字符串转成UTF8字符串。", - "name": "tk_utf8_from_utf16", - "return": { - "type": "char*", - "desc": "返回UTF8字符串。" - } - }, - { - "params": [ - { - "type": "const wchar_t*", - "name": "in", - "desc": "输入字符串。" - }, - { - "type": "uint32_t", - "name": "in_size", - "desc": "输入字符串的长度。" - }, - { - "type": "const char*", - "name": "out", - "desc": "输出字符串。" - }, - { - "type": "uint32_t", - "name": "out_size", - "desc": "输出字符串的最大长度。" - } - ], - "annotation": {}, - "desc": "把ucs字符串转成UTF8字符串。", - "name": "tk_utf8_from_utf16_ex", - "return": { - "type": "char*", - "desc": "返回UTF8字符串。" - } + "desc": "整数枚举类型。", + "name": "VALUE_DESC_TYPE_INT_ENUMS" }, { - "params": [ - { - "type": "const char*", - "name": "str", - "desc": "str。" - }, - { - "type": "const wchar_t*", - "name": "out", - "desc": "返回结果缓冲区。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "缓冲区大小。" - } - ], - "annotation": {}, - "desc": "将char类型转换为wchar_t类型。", - "name": "tk_utf8_to_utf16", - "return": { - "type": "wchar_t*", - "desc": "值。" - } + "desc": "字符串枚举类型。", + "name": "VALUE_DESC_TYPE_STRING_ENUMS" } ], - "events": [], - "properties": [], - "header": "tkc/utf8.h", - "desc": "wchar_t和char类型转换接口。\n\n示例:\n\n```c\nconst char* str = \"hello\";\nconst wchar_t* wstr = L\"hello\";\nchar res_str[128];\nwchar_t res_wstr[128];\n\ntk_utf8_to_utf16(str, res_wstr, ARRAY_SIZE(res_wstr));\ntk_utf8_from_utf16(wstr, res_str, ARRAY_SIZE(res_str));\n```", - "name": "utf8_t", - "annotation": { - "fake": true - }, + "header": "tkc/value_desc.h", + "name": "value_desc_type_t", + "prefix": "VALUE_DESC_TYPE_", "level": 1 }, { @@ -38719,370 +24962,261 @@ }, "level": 1 }, - { - "type": "enum", - "desc": "属性描述类型常量定义。", - "consts": [ - { - "desc": "有符号8位整数类型。", - "name": "VALUE_DESC_TYPE_INT8" - }, - { - "desc": "无符号8位整数类型。", - "name": "VALUE_DESC_TYPE_UINT8" - }, - { - "desc": "有符号16位整数类型。", - "name": "VALUE_DESC_TYPE_INT16" - }, - { - "desc": "无符号16位整数类型。", - "name": "VALUE_DESC_TYPE_UINT16" - }, - { - "desc": "有符号32位整数类型。", - "name": "VALUE_DESC_TYPE_INT32" - }, - { - "desc": "无符号32位整数类型。", - "name": "VALUE_DESC_TYPE_UINT32" - }, - { - "desc": "有符号64位整数类型。", - "name": "VALUE_DESC_TYPE_INT64" - }, - { - "desc": "无符号64位整数类型。", - "name": "VALUE_DESC_TYPE_UINT64" - }, - { - "desc": "单精度浮点数类型。", - "name": "VALUE_DESC_TYPE_FLOAT" - }, - { - "desc": "双精度浮点数类型。", - "name": "VALUE_DESC_TYPE_DOUBLE" - }, - { - "desc": "布尔类型。", - "name": "VALUE_DESC_TYPE_BOOL" - }, - { - "desc": "字符串类型。", - "name": "VALUE_DESC_TYPE_STRING" - }, - { - "desc": "二进制类型。", - "name": "VALUE_DESC_TYPE_BINARY" - }, - { - "desc": "整数枚举类型。", - "name": "VALUE_DESC_TYPE_INT_ENUMS" - }, - { - "desc": "字符串枚举类型。", - "name": "VALUE_DESC_TYPE_STRING_ENUMS" - } - ], - "header": "tkc/value_desc.h", - "name": "value_desc_type_t", - "prefix": "VALUE_DESC_TYPE_", - "level": 1 - }, - { - "type": "enum", - "desc": "属性描述格式常量定义。", - "consts": [ - { - "desc": "无特殊格式。", - "name": "VALUE_FORMAT_TYPE_NONE" - }, - { - "desc": "16进制格式。", - "name": "VALUE_FORMAT_TYPE_HEX" - }, - { - "desc": "非负格式(用于进一步限制float/double)。", - "name": "VALUE_FORMAT_TYPE_HEX" - }, - { - "desc": "手机号码格式。", - "name": "VALUE_FORMAT_TYPE_PHONE" - }, - { - "desc": "邮件格式。", - "name": "VALUE_FORMAT_TYPE_PHONE" - }, - { - "desc": "ip4地址格式。", - "name": "VALUE_FORMAT_TYPE_IP4_ADDRESS" - }, - { - "desc": "域名格式。", - "name": "VALUE_FORMAT_TYPE_DOMAIN_NAME" - }, - { - "desc": "URL格式。", - "name": "VALUE_FORMAT_TYPE_URL" - }, - { - "desc": "JSON格式。", - "name": "VALUE_FORMAT_TYPE_JSON" - }, - { - "desc": "XML格式。", - "name": "VALUE_FORMAT_TYPE_XML" - }, - { - "desc": "UBJSON格式。", - "name": "VALUE_FORMAT_TYPE_UBJSON" - }, - { - "desc": "JS格式。", - "name": "VALUE_FORMAT_TYPE_JS" - }, - { - "desc": "CSV格式。", - "name": "VALUE_FORMAT_TYPE_CSV" - } - ], - "header": "tkc/value_desc.h", - "name": "value_format_type_t", - "prefix": "VALUE_FORMAT_TYPE_", - "level": 1 - }, - { - "type": "enum", - "desc": "属性描述范围常量定义。", - "consts": [ - { - "desc": "单个对象的属性。", - "name": "PROP_DESC_FLAG_OBJECT" - }, - { - "desc": "同一个类所有实例共享属性。", - "name": "PROP_DESC_FLAG_CLASS" - }, - { - "desc": "全局属性。", - "name": "PROP_DESC_FLAG_GLOBAL" - }, - { - "desc": "可读取。", - "name": "PROP_DESC_FLAG_READABLE," - }, - { - "desc": "可修改。", - "name": "PROP_DESC_FLAG_WRITBALE," - }, - { - "desc": "可配置。", - "name": "PROP_DESC_FLAG_CONFIGURABLE" - }, - { - "desc": "需要持久化。", - "name": "PROP_DESC_FLAG_PERSISTENT" - } - ], - "header": "tkc/value_desc.h", - "name": "prop_desc_flags_t", - "prefix": "PROP_DESC_FLAGS_", - "level": 1 - }, - { - "type": "enum", - "desc": "参数描述范围常量定义。", - "consts": [ - { - "desc": "必须提供。", - "name": "ARG_DESC_FLAGS_REQUIRED" - } - ], - "header": "tkc/value_desc.h", - "name": "arg_desc_flags_t", - "prefix": "ARG_DESC_FLAGS_", - "level": 1 - }, { "type": "class", - "methods": [], + "methods": [ + { + "params": [ + { + "type": "const wchar_t*", + "name": "in", + "desc": "输入字符串。" + }, + { + "type": "const char*", + "name": "out", + "desc": "输出字符串。" + }, + { + "type": "uint32_t", + "name": "out_size", + "desc": "输出字符串的最大长度。" + } + ], + "annotation": {}, + "desc": "把ucs字符串转成UTF8字符串。", + "name": "tk_utf8_from_utf16", + "return": { + "type": "char*", + "desc": "返回UTF8字符串。" + } + }, + { + "params": [ + { + "type": "const wchar_t*", + "name": "in", + "desc": "输入字符串。" + }, + { + "type": "uint32_t", + "name": "in_size", + "desc": "输入字符串的长度。" + }, + { + "type": "const char*", + "name": "out", + "desc": "输出字符串。" + }, + { + "type": "uint32_t", + "name": "out_size", + "desc": "输出字符串的最大长度。" + } + ], + "annotation": {}, + "desc": "把ucs字符串转成UTF8字符串。", + "name": "tk_utf8_from_utf16_ex", + "return": { + "type": "char*", + "desc": "返回UTF8字符串。" + } + }, + { + "params": [ + { + "type": "const char*", + "name": "str", + "desc": "str。" + }, + { + "type": "const wchar_t*", + "name": "out", + "desc": "返回结果缓冲区。" + }, + { + "type": "uint32_t", + "name": "size", + "desc": "缓冲区大小。" + } + ], + "annotation": {}, + "desc": "将char类型转换为wchar_t类型。", + "name": "tk_utf8_to_utf16", + "return": { + "type": "wchar_t*", + "desc": "值。" + } + } + ], "events": [], - "properties": [ - { - "name": "type", - "desc": "类型。", - "type": "uint8_t", - "annotation": { - "readable": true - } - }, - { - "name": "format", - "desc": "格式。", - "type": "uint8_t", - "annotation": { - "readable": true - } - }, - { - "name": "flags", - "desc": "flags。", - "type": "uint8_t", - "annotation": { - "readable": true - } - }, - { - "name": "name", - "desc": "名称。", - "type": "const char*", - "annotation": { - "readable": true - } - }, - { - "name": "display_name", - "desc": "显示名称。", - "type": "const char*", - "annotation": { - "readable": true - } - }, - { - "name": "desc", - "desc": "描述。", - "type": "const char*", - "annotation": { - "readable": true - } - } - ], - "header": "tkc/value_desc.h", - "desc": "属性描述。", - "name": "value_desc_t", - "level": 1 - }, - { - "type": "class", - "methods": [], - "events": [], - "properties": [ - { - "name": "defvalue", - "desc": "缺省值。", - "type": "const char*", - "annotation": { - "readable": true - } - }, - { - "name": "enums", - "desc": "枚举值。", - "type": "const char**", - "annotation": { - "readable": true - } - } - ], - "header": "tkc/value_desc.h", - "desc": "字符串枚举类型属性描述。", - "name": "value_desc_string_enums_t", - "level": 1 - }, - { - "type": "enum", - "desc": "类型常量定义。", - "consts": [ - { - "desc": "无效类型。", - "name": "VALUE_TYPE_INVALID" - }, - { - "desc": "BOOL类型。", - "name": "VALUE_TYPE_BOOL" - }, - { - "desc": "int8_t类型。", - "name": "VALUE_TYPE_INT8" - }, - { - "desc": "uint8_t类型。", - "name": "VALUE_TYPE_UINT8" - }, - { - "desc": "int16_t类型。", - "name": "VALUE_TYPE_INT16" - }, - { - "desc": "uint16_t类型。", - "name": "VALUE_TYPE_UINT16" - }, - { - "desc": "int32_t类型。", - "name": "VALUE_TYPE_INT32" - }, - { - "desc": "uint32_t类型。", - "name": "VALUE_TYPE_UINT32" - }, - { - "desc": "int64_t类型。", - "name": "VALUE_TYPE_INT64" - }, - { - "desc": "uint64_t类型。", - "name": "VALUE_TYPE_UINT64" - }, - { - "desc": "void*类型。", - "name": "VALUE_TYPE_POINTER" - }, - { - "desc": "float_t类型。", - "name": "VALUE_TYPE_FLOAT" - }, - { - "desc": "float类型。", - "name": "VALUE_TYPE_FLOAT32" - }, - { - "desc": "double类型。", - "name": "VALUE_TYPE_DOUBLE" - }, - { - "desc": "char*类型。", - "name": "VALUE_TYPE_STRING" - }, - { - "desc": "wchar_t*类型。", - "name": "VALUE_TYPE_WSTRING" - }, - { - "desc": "object_t*类型。", - "name": "VALUE_TYPE_OBJECT" - }, - { - "desc": "带长度的字符串。", - "name": "VALUE_TYPE_SIZED_STRING" - }, - { - "desc": "二进制数据。", - "name": "VALUE_TYPE_BINARY" - }, - { - "desc": "二进制数据(UBJSON)。", - "name": "VALUE_TYPE_UBJSON" - }, - { - "desc": "特殊用途。", - "name": "VALUE_TYPE_TOKEN" - } - ], - "header": "tkc/value.h", - "name": "value_type_t", - "prefix": "VALUE_TYPE_", + "properties": [], + "header": "tkc/utf8.h", + "desc": "wchar_t和char类型转换接口。\n\n示例:\n\n```c\nconst char* str = \"hello\";\nconst wchar_t* wstr = L\"hello\";\nchar res_str[128];\nwchar_t res_wstr[128];\n\ntk_utf8_to_utf16(str, res_wstr, ARRAY_SIZE(res_wstr));\ntk_utf8_from_utf16(wstr, res_str, ARRAY_SIZE(res_str));\n```", + "name": "utf8_t", "annotation": { - "scriptable": true + "fake": true + }, + "level": 1 + }, + { + "type": "enum", + "desc": "编码名称。", + "consts": [ + { + "desc": "UTF-8。", + "name": "ENCODING_UTF8" + }, + { + "desc": "UTF-16。", + "name": "ENCODING_UTF16" + }, + { + "desc": "UTF-32。", + "name": "ENCODING_UTF32" + }, + { + "desc": "GBK。", + "name": "ENCODING_GBK" + }, + { + "desc": "BIG5-2003。", + "name": "ENCODING_BIG" + }, + { + "desc": "GB_2312-80。", + "name": "ENCODING_GB2312" + }, + { + "desc": "GB18030。", + "name": "ENCODING_GB18030" + } + ], + "header": "charset/encoding.h", + "name": "encoding_name_t", + "prefix": "ENCODING_NAME_", + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "type": "encoding_name_t", + "name": "from", + "desc": "源字符串的编码名称。" + }, + { + "type": "const char*", + "name": "from_str", + "desc": "源字符串。" + }, + { + "type": "uint32_t", + "name": "from_size", + "desc": "源字符串的长度。" + }, + { + "type": "encoding_name_t", + "name": "to", + "desc": "目标字符串的编码名称。" + }, + { + "type": "const char*", + "name": "", + "desc": "。" + }, + { + "type": "uint32_t", + "name": "to_size", + "desc": "目标字符串的最大长度。" + } + ], + "annotation": { + "static": true + }, + "desc": "字符集转换。", + "name": "encoding_convert", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "const char*", + "name": "from_str", + "desc": "源字符串(utf8)。" + }, + { + "type": "uint32_t", + "name": "from_size", + "desc": "源字符串的长度。" + }, + { + "type": "const char*", + "name": "to_str", + "desc": "目标字符串(gbk)。" + }, + { + "type": "uint32_t", + "name": "to_size", + "desc": "目标字符串的最大长度。" + } + ], + "annotation": { + "static": true + }, + "desc": "将utf8转换成gbk编码。", + "name": "encoding_utf8_to_gbk", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "const char*", + "name": "from_str", + "desc": "源字符串(gbk)。" + }, + { + "type": "uint32_t", + "name": "from_size", + "desc": "源字符串的长度。" + }, + { + "type": "const char*", + "name": "", + "desc": "。" + }, + { + "type": "uint32_t", + "name": "to_size", + "desc": "目标字符串的最大长度。" + } + ], + "annotation": { + "static": true + }, + "desc": "将gbk转换成utf8编码。", + "name": "encoding_gbk_to_utf8", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + } + ], + "events": [], + "properties": [], + "header": "charset/encoding.h", + "desc": "encoding conversion\n\n示例:\n\n```c\n```", + "name": "encoding_t", + "annotation": { + "fake": true }, "level": 1 }, @@ -39092,42 +25226,35 @@ { "params": [ { - "type": "uint32_t", - "name": "capacity", - "desc": "action的容量。" + "type": "const char*", + "name": "surl", + "desc": "字符串格式的URL。" } ], - "annotation": { - "constructor": true - }, - "desc": "创建waitable_action_queue对象。", - "name": "waitable_action_queue_create", + "annotation": {}, + "desc": "创建URL对象。", + "name": "url_create", "return": { - "type": "waitable_action_queue_t*", - "desc": "waitable_action_queue对象。" + "type": "url_t*", + "desc": "返回URL对象。" } }, { "params": [ { - "type": "waitable_action_queue_t*", - "name": "q", - "desc": "waitable_action_queue对象。" + "type": "url_t*", + "name": "url", + "desc": "url对象。" }, { - "type": "qaction_t**", - "name": "action", - "desc": "用于返回action对象。" - }, - { - "type": "uint32_t", - "name": "timeout_ms", - "desc": "超时时间(ms)" + "type": "const char*", + "name": "schema", + "desc": "schema。" } ], "annotation": {}, - "desc": "接收一个请求。", - "name": "waitable_action_queue_recv", + "desc": "设置schema。", + "name": "url_set_schema", "return": { "type": "ret_t", "desc": "返回RET_OK表示成功,否则表示失败。" @@ -39136,24 +25263,19 @@ { "params": [ { - "type": "waitable_action_queue_t*", - "name": "q", - "desc": "waitable_action_queue对象。" + "type": "url_t*", + "name": "url", + "desc": "url对象。" }, { - "type": "qaction_t*", - "name": "action", - "desc": "action对象。" - }, - { - "type": "uint32_t", - "name": "timeout_ms", - "desc": "超时时间(ms)" + "type": "const char*", + "name": "user_name", + "desc": "用户名。" } ], "annotation": {}, - "desc": "发送一个请求。", - "name": "waitable_action_queue_send", + "desc": "设置用户名。", + "name": "url_set_user_name", "return": { "type": "ret_t", "desc": "返回RET_OK表示成功,否则表示失败。" @@ -39162,14 +25284,145 @@ { "params": [ { - "type": "waitable_action_queue_t*", - "name": "q", - "desc": "waitable_action_queue对象。" + "type": "url_t*", + "name": "url", + "desc": "url对象。" + }, + { + "type": "const char*", + "name": "password", + "desc": "密码。" } ], "annotation": {}, - "desc": "销毁。", - "name": "waitable_action_queue_destroy", + "desc": "设置密码。", + "name": "url_set_password", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "url_t*", + "name": "url", + "desc": "url对象。" + }, + { + "type": "const char*", + "name": "host", + "desc": "主机名。" + } + ], + "annotation": {}, + "desc": "设置主机名。", + "name": "url_set_host", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "url_t*", + "name": "url", + "desc": "url对象。" + }, + { + "type": "int32_t", + "name": "port", + "desc": "端口。" + } + ], + "annotation": {}, + "desc": "设置端口。", + "name": "url_set_port", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "url_t*", + "name": "url", + "desc": "url对象。" + }, + { + "type": "const char*", + "name": "path", + "desc": "路径。" + } + ], + "annotation": {}, + "desc": "设置路径。", + "name": "url_set_path", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "url_t*", + "name": "url", + "desc": "url对象。" + }, + { + "type": "const char*", + "name": "name", + "desc": "参数名。" + }, + { + "type": "const char*", + "name": "value", + "desc": "参数值。" + } + ], + "annotation": {}, + "desc": "设置参数。", + "name": "url_set_param", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "url_t*", + "name": "url", + "desc": "url对象。" + }, + { + "type": "const char*", + "name": "name", + "desc": "参数名。" + } + ], + "annotation": {}, + "desc": "获取参数。", + "name": "url_get_param", + "return": { + "type": "const char*", + "desc": "返回指定参数名的参数值。" + } + }, + { + "params": [ + { + "type": "url_t*", + "name": "url", + "desc": "url对象。" + } + ], + "annotation": {}, + "desc": "销毁url对象。", + "name": "url_destroy", "return": { "type": "ret_t", "desc": "返回RET_OK表示成功,否则表示失败。" @@ -39177,10 +25430,161 @@ } ], "events": [], - "properties": [], - "header": "tkc/waitable_action_queue.h", - "desc": "waitable actionqueue", - "name": "waitable_action_queue_t", + "properties": [ + { + "name": "schema", + "desc": "schema。", + "type": "char*", + "annotation": { + "readable": true + } + }, + { + "name": "user_name", + "desc": "用户名。", + "type": "char*", + "annotation": { + "readable": true + } + }, + { + "name": "password", + "desc": "密码。", + "type": "char*", + "annotation": { + "readable": true + } + }, + { + "name": "host", + "desc": "主机名。", + "type": "char*", + "annotation": { + "readable": true + } + }, + { + "name": "path", + "desc": "路径。", + "type": "char*", + "annotation": { + "readable": true + } + }, + { + "name": "port", + "desc": "端口。", + "type": "int32_t", + "annotation": { + "readable": true + } + }, + { + "name": "params", + "desc": "参数集合。", + "type": "object_t*", + "annotation": { + "readable": true + } + } + ], + "header": "tkc/url.h", + "desc": "URL", + "name": "url_t", + "level": 1 + }, + { + "params": [ + { + "type": "const char*", + "name": "app_name", + "desc": "应用程序名称。" + } + ], + "annotation": { + "global": true + }, + "desc": "初始化应用程序的配置信息。", + "name": "app_conf_init_ini", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + }, + "type": "method", + "header": "conf_io/app_conf_init_ini.h", + "level": 1 + }, + { + "params": [ + { + "type": "const char*", + "name": "app_name", + "desc": "应用程序名称。" + } + ], + "annotation": { + "global": true + }, + "desc": "初始化应用程序的配置信息。", + "name": "app_conf_init_json", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + }, + "type": "method", + "header": "conf_io/app_conf_init_json.h", + "level": 1 + }, + { + "params": [ + { + "type": "const char*", + "name": "app_name", + "desc": "应用程序名称。" + } + ], + "annotation": { + "global": true + }, + "desc": "初始化应用程序的配置信息。", + "name": "app_conf_init_ubjson", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + }, + "type": "method", + "header": "conf_io/app_conf_init_ubjson.h", + "level": 1 + }, + { + "params": [ + { + "type": "conf_loader_t", + "name": "load", + "desc": "配置加载函数。" + }, + { + "type": "const char*", + "name": "app_name", + "desc": "应用程序名称。" + }, + { + "type": "const char*", + "name": "extname", + "desc": "文件扩展名。" + } + ], + "annotation": { + "global": true + }, + "desc": "初始化。", + "name": "app_conf_init", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + }, + "type": "method", + "header": "conf_io/app_conf_init.h", "level": 1 }, { @@ -39189,52 +25593,95 @@ { "params": [ { - "type": "uint32_t", - "name": "capacity", - "desc": "容量。" - }, - { - "type": "uint32_t", - "name": "block_size", - "desc": "块的大小。" + "type": "object_t*", + "name": "", + "desc": "。" } ], "annotation": { - "constructor": true + "static": true }, - "desc": "创建waitable_ring_buffer对象。", - "name": "waitable_ring_buffer_create", + "desc": "设置app_conf实例。", + "name": "app_conf_set_instance", "return": { - "type": "waitable_ring_buffer_t*", - "desc": "waitable_ring_buffer对象。" + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [], + "annotation": { + "static": true + }, + "desc": "获取app_conf实例。", + "name": "app_conf_get_instance", + "return": { + "type": "object_t*", + "desc": "返回app_conf实例。" + } + }, + { + "params": [], + "annotation": { + "static": true, + "scriptable": true + }, + "desc": "持久保存配置。", + "name": "app_conf_save", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [], + "annotation": { + "static": true, + "scriptable": true + }, + "desc": "重新加载配置(内存中的配置丢失)。", + "name": "app_conf_reload", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" } }, { "params": [ { - "type": "waitable_ring_buffer_t*", - "name": "rb", - "desc": "waitable_ring_buffer对象。" + "type": "event_func_t", + "name": "on_event", + "desc": "事件处理函数。" }, { "type": "void*", - "name": "buff", - "desc": "接收数据的buff。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "读取数据的长度(必须等于 block_size)。" - }, - { - "type": "uint32_t", - "name": "timeout_ms", - "desc": "超时时间(ms)" + "name": "ctx", + "desc": "事件处理函数上下文。" } ], - "annotation": {}, - "desc": "读取数据。", - "name": "waitable_ring_buffer_read", + "annotation": { + "static": true + }, + "desc": "注册配置变化事件。", + "name": "app_conf_on_changed", + "return": { + "type": "uint32_t", + "desc": "返回id,用于app_conf_off_changed。" + } + }, + { + "params": [ + { + "type": "uint32_t", + "name": "id", + "desc": "app_conf_on_changed返回的ID。" + } + ], + "annotation": { + "static": true + }, + "desc": "注销配置变化事件。", + "name": "app_conf_off_changed", "return": { "type": "ret_t", "desc": "返回RET_OK表示成功,否则表示失败。" @@ -39243,29 +25690,29 @@ { "params": [ { - "type": "waitable_ring_buffer_t*", - "name": "rb", - "desc": "waitable_ring_buffer对象。" - }, - { - "type": "const void*", - "name": "buff", - "desc": "要写入的数据。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "数据的长度(必须等于 block_size)。" - }, - { - "type": "uint32_t", - "name": "timeout_ms", - "desc": "超时时间(ms)" + "type": "void*", + "name": "ctx", + "desc": "事件处理函数上下文。" } ], - "annotation": {}, - "desc": "写入数据。", - "name": "waitable_ring_buffer_write", + "annotation": { + "static": true + }, + "desc": "注销配置变化事件。", + "name": "app_conf_off_changed_by_ctx", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [], + "annotation": { + "static": true, + "scriptable": true + }, + "desc": "释放conf对象。", + "name": "app_conf_deinit", "return": { "type": "ret_t", "desc": "返回RET_OK表示成功,否则表示失败。" @@ -39274,14 +25721,373 @@ { "params": [ { - "type": "waitable_ring_buffer_t*", - "name": "rb", - "desc": "waitable_ring_buffer对象。" + "type": "const char*", + "name": "key", + "desc": "配置项的名称。" + }, + { + "type": "const value_t*", + "name": "v", + "desc": "配置项的值。" } ], - "annotation": {}, - "desc": "销毁。", - "name": "waitable_ring_buffer_destroy", + "annotation": { + "static": true + }, + "desc": "设置配置项的值。", + "name": "app_conf_set", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "const char*", + "name": "key", + "desc": "配置项的名称。" + }, + { + "type": "value_t*", + "name": "v", + "desc": "配置项的值(用于返回)。" + } + ], + "annotation": { + "static": true + }, + "desc": "获取配置项的值。", + "name": "app_conf_get", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "const char*", + "name": "key", + "desc": "配置项的名称。" + } + ], + "annotation": { + "static": true, + "scriptable": true + }, + "desc": "检查配置项是否存在。", + "name": "app_conf_exist", + "return": { + "type": "bool_t", + "desc": "返回TRUE表示存在,FALSE表示不存在。" + } + }, + { + "params": [ + { + "type": "const char*", + "name": "key", + "desc": "配置项的名称。" + }, + { + "type": "int32_t", + "name": "v", + "desc": "配置项的值。" + } + ], + "annotation": { + "static": true, + "scriptable": true + }, + "desc": "设置整数类型配置项的值。", + "name": "app_conf_set_int", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "const char*", + "name": "key", + "desc": "配置项的名称。" + }, + { + "type": "int64_t", + "name": "v", + "desc": "配置项的值。" + } + ], + "annotation": { + "static": true, + "scriptable": true + }, + "desc": "设置64位整数类型配置项的值。", + "name": "app_conf_set_int64", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "const char*", + "name": "key", + "desc": "配置项的名称。" + }, + { + "type": "bool_t", + "name": "v", + "desc": "配置项的值。" + } + ], + "annotation": { + "static": true, + "scriptable": true + }, + "desc": "设置bool类型配置项的值。", + "name": "app_conf_set_bool", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "const char*", + "name": "key", + "desc": "配置项的名称。" + }, + { + "type": "double", + "name": "v", + "desc": "配置项的值。" + } + ], + "annotation": { + "static": true, + "scriptable": true + }, + "desc": "设置双精度类型配置项的值。", + "name": "app_conf_set_double", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "const char*", + "name": "key", + "desc": "配置项的名称。" + }, + { + "type": "const char*", + "name": "v", + "desc": "配置项的值。" + } + ], + "annotation": { + "static": true, + "scriptable": true + }, + "desc": "设置字符串类型配置项的值。", + "name": "app_conf_set_str", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "const char*", + "name": "key", + "desc": "配置项的名称。" + }, + { + "type": "const wchar_t*", + "name": "v", + "desc": "配置项的值。" + } + ], + "annotation": { + "static": true + }, + "desc": "设置宽字符串类型配置项的值。", + "name": "app_conf_set_wstr", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "const char*", + "name": "key", + "desc": "配置项的名称。" + }, + { + "type": "int32_t", + "name": "defval", + "desc": "缺省值。" + } + ], + "annotation": { + "static": true, + "scriptable": true + }, + "desc": "获取整数类型配置项的值。", + "name": "app_conf_get_int", + "return": { + "type": "int32_t", + "desc": "返回配置项的值(如果不存在返回缺省值)。" + } + }, + { + "params": [ + { + "type": "const char*", + "name": "key", + "desc": "配置项的名称。" + }, + { + "type": "int64_t", + "name": "defval", + "desc": "缺省值。" + } + ], + "annotation": { + "static": true, + "scriptable": true + }, + "desc": "获取64位整数类型配置项的值。", + "name": "app_conf_get_int64", + "return": { + "type": "int64_t", + "desc": "返回配置项的值(如果不存在返回缺省值)。" + } + }, + { + "params": [ + { + "type": "const char*", + "name": "key", + "desc": "配置项的名称。" + }, + { + "type": "bool_t", + "name": "defval", + "desc": "缺省值。" + } + ], + "annotation": { + "static": true, + "scriptable": true + }, + "desc": "获取bool类型配置项的值。", + "name": "app_conf_get_bool", + "return": { + "type": "bool_t", + "desc": "返回配置项的值(如果不存在返回缺省值)。" + } + }, + { + "params": [ + { + "type": "const char*", + "name": "key", + "desc": "配置项的名称。" + }, + { + "type": "double", + "name": "defval", + "desc": "缺省值。" + } + ], + "annotation": { + "static": true, + "scriptable": true + }, + "desc": "获取单精度浮点数类型配置项的值。", + "name": "app_conf_get_double", + "return": { + "type": "double", + "desc": "返回配置项的值(如果不存在返回缺省值)。" + } + }, + { + "params": [ + { + "type": "const char*", + "name": "key", + "desc": "配置项的名称。" + }, + { + "type": "const char*", + "name": "defval", + "desc": "缺省值。" + } + ], + "annotation": { + "static": true, + "scriptable": true + }, + "desc": "获取字符串类型配置项的值。", + "name": "app_conf_get_str", + "return": { + "type": "const char*", + "desc": "返回配置项的值(如果不存在返回缺省值)。" + } + }, + { + "params": [ + { + "type": "const char*", + "name": "key", + "desc": "配置项的名称。" + }, + { + "type": "const wchar_t*", + "name": "str", + "desc": "返回值。" + }, + { + "type": "uint32_t", + "name": "max_size", + "desc": "最大长度(字符数)。" + } + ], + "annotation": { + "static": true + }, + "desc": "获取宽字符串类型配置项的值。", + "name": "app_conf_get_wstr", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "const char*", + "name": "key", + "desc": "配置项的名称。" + } + ], + "annotation": { + "static": true, + "scriptable": true + }, + "desc": "删除配置项。", + "name": "app_conf_remove", "return": { "type": "ret_t", "desc": "返回RET_OK表示成功,否则表示失败。" @@ -39290,9 +26096,161 @@ ], "events": [], "properties": [], - "header": "tkc/waitable_ring_buffer.h", - "desc": "waitable ring buffer", - "name": "waitable_ring_buffer_t", + "header": "conf_io/app_conf.h", + "desc": "应用程序的配置信息。\n\n底层实现可以是任何格式,比如INI,XML,JSON和UBJSON。\n\n对于树状的文档,key可以是多级的,用.分隔。如network.ip。\n\nconf-io是可选组件,需要自己包含头文件,否则64位数据类型会被截断成32位的数据。\n\n```c\n#include \"conf_io/app_conf.h\"\n```", + "name": "app_conf_t", + "annotation": { + "fake": true, + "scriptable": true + }, + "level": 1 + }, + { + "type": "enum", + "desc": "函数返回值常量定义。", + "consts": [ + { + "desc": "成功。", + "name": "RET_OK" + }, + { + "desc": "Out of memory。", + "name": "RET_OOM" + }, + { + "desc": "失败。", + "name": "RET_FAIL" + }, + { + "desc": "没有实现/不支持。", + "name": "RET_NOT_IMPL" + }, + { + "desc": "退出。通常用于主循环。", + "name": "RET_QUIT" + }, + { + "desc": "找到。", + "name": "RET_FOUND" + }, + { + "desc": "对象忙。", + "name": "RET_BUSY" + }, + { + "desc": "移出。通常用于定时器。", + "name": "RET_REMOVE" + }, + { + "desc": "重复。通常用于定时器。", + "name": "RET_REPEAT" + }, + { + "desc": "没找到。", + "name": "RET_NOT_FOUND" + }, + { + "desc": "操作完成。", + "name": "RET_DONE" + }, + { + "desc": "停止后续操作。", + "name": "RET_STOP" + }, + { + "desc": "跳过当前项。", + "name": "RET_SKIP" + }, + { + "desc": "继续后续操作。", + "name": "RET_CONTINUE" + }, + { + "desc": "对象属性变化。", + "name": "RET_OBJECT_CHANGED" + }, + { + "desc": "集合数目变化。", + "name": "RET_ITEMS_CHANGED" + }, + { + "desc": "无效参数。", + "name": "RET_BAD_PARAMS" + }, + { + "desc": "超时。", + "name": "RET_TIMEOUT" + }, + { + "desc": "CRC错误。", + "name": "RET_CRC" + }, + { + "desc": "IO错误。", + "name": "RET_IO" + }, + { + "desc": "End of Stream", + "name": "RET_EOS" + }, + { + "desc": "没有改变。", + "name": "RET_NOT_MODIFIED" + } + ], + "header": "tkc/types_def.h", + "name": "ret_t", + "prefix": "RET_", + "annotation": { + "scriptable": true + }, + "level": 1 + }, + { + "params": [ + { + "type": "const char*", + "name": "data", + "desc": "数据。" + } + ], + "annotation": { + "global": true + }, + "desc": "从缓存区加载ini格式的conf doc对象。", + "name": "conf_doc_load_ini", + "return": { + "type": "conf_doc_t*", + "desc": "返回conf_doc对象。" + }, + "type": "method", + "header": "conf_io/conf_ini.h", + "level": 1 + }, + { + "params": [ + { + "type": "conf_doc_t*", + "name": "doc", + "desc": "conf doc对象。" + }, + { + "type": "str_t*", + "name": "str", + "desc": "保存结果。" + } + ], + "annotation": { + "global": true + }, + "desc": "保存conf doc对象为ini格式。", + "name": "conf_doc_save_ini", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败" + }, + "type": "method", + "header": "conf_io/conf_ini.h", "level": 1 }, { @@ -39301,7 +26259,1786 @@ { "params": [ { - "type": "wstr_t*", + "type": "tokenizer_t*", + "name": "tokenizer", + "desc": "tokenizer对象。" + }, + { + "type": "char*", + "name": "str", + "desc": "要解析的字符串。" + }, + { + "type": "uint32_t", + "name": "size", + "desc": "字符串长度。" + }, + { + "type": "char*", + "name": "separtor", + "desc": "分隔字符。" + } + ], + "annotation": { + "constructor": true + }, + "desc": "初始化tokenizer对象。", + "name": "tokenizer_init", + "return": { + "type": "tokenizer_t*", + "desc": "tokenizer对象本身。" + } + }, + { + "params": [ + { + "type": "tokenizer_t*", + "name": "tokenizer", + "desc": "tokenizer对象。" + }, + { + "type": "char*", + "name": "str", + "desc": "要解析的字符串。" + }, + { + "type": "uint32_t", + "name": "size", + "desc": "字符串长度。" + }, + { + "type": "char*", + "name": "separtor", + "desc": "分隔字符。" + }, + { + "type": "char*", + "name": "single_char_token", + "desc": "单字符token。" + } + ], + "annotation": { + "constructor": true + }, + "desc": "初始化tokenizer对象。", + "name": "tokenizer_init_ex", + "return": { + "type": "tokenizer_t*", + "desc": "tokenizer对象本身。" + } + }, + { + "params": [ + { + "type": "tokenizer_t*", + "name": "tokenizer", + "desc": "tokenizer对象。" + } + ], + "annotation": {}, + "desc": "是否还有下一个token。", + "name": "tokenizer_has_more", + "return": { + "type": "bool_t", + "desc": "还有下一个token返回TRUE,否则返回FALSE。" + } + }, + { + "params": [ + { + "type": "tokenizer_t*", + "name": "tokenizer", + "desc": "tokenizer对象。" + } + ], + "annotation": {}, + "desc": "获取下一个token。", + "name": "tokenizer_next", + "return": { + "type": "char*", + "desc": "成功返回token,失败返回NULL。" + } + }, + { + "params": [ + { + "type": "tokenizer_t*", + "name": "tokenizer", + "desc": "tokenizer对象。" + }, + { + "type": "const char*", + "name": "str", + "desc": "字符集。" + } + ], + "annotation": {}, + "desc": "获取下一个token,该token直到遇到指定的char。", + "name": "tokenizer_next_until", + "return": { + "type": "char*", + "desc": "成功返回token,失败返回NULL。" + } + }, + { + "params": [ + { + "type": "tokenizer_t*", + "name": "tokenizer", + "desc": "tokenizer对象。" + }, + { + "type": "const char*", + "name": "str", + "desc": "字符集。" + } + ], + "annotation": {}, + "desc": "获取下一个expr,该expr直到遇到指定的char。", + "name": "tokenizer_next_expr_until", + "return": { + "type": "char*", + "desc": "成功返回token,失败返回NULL。" + } + }, + { + "params": [ + { + "type": "tokenizer_t*", + "name": "tokenizer", + "desc": "tokenizer对象。" + }, + { + "type": "int", + "name": "defval", + "desc": "缺省值。" + } + ], + "annotation": {}, + "desc": "获取下一个token,并转换成int。", + "name": "tokenizer_next_int", + "return": { + "type": "char*", + "desc": "成功返回token的int值,失败返回缺省值。" + } + }, + { + "params": [ + { + "type": "tokenizer_t*", + "name": "tokenizer", + "desc": "tokenizer对象。" + }, + { + "type": "float", + "name": "defval", + "desc": "缺省值。" + } + ], + "annotation": {}, + "desc": "获取下一个token,并转换成float。", + "name": "tokenizer_next_float", + "return": { + "type": "char*", + "desc": "成功返回token的float值,失败返回缺省值。" + } + }, + { + "params": [ + { + "type": "tokenizer_t*", + "name": "tokenizer", + "desc": "tokenizer对象。" + } + ], + "annotation": {}, + "desc": "重置tokenizer。", + "name": "tokenizer_deinit", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + } + ], + "events": [], + "properties": [ + { + "name": "str", + "desc": "字符串。", + "type": "char*", + "annotation": { + "readable": true + } + }, + { + "name": "size", + "desc": "字符串的长度。", + "type": "uint32_t", + "annotation": { + "readable": true + } + }, + { + "name": "cursor", + "desc": "当前位置。", + "type": "uint32_t", + "annotation": { + "readable": true + } + }, + { + "name": "separtor", + "desc": "分隔字符串。", + "type": "char*", + "annotation": { + "readable": true + } + }, + { + "name": "single_char_token", + "desc": "单字符的token。", + "type": "char*", + "annotation": { + "readable": true + } + } + ], + "header": "tkc/tokenizer.h", + "desc": "从字符串中解析出一个一个的token。\n\n```c\ntokenizer_t tokenizer;\ntokenizer_t* t = tokenizer_init(&tokenizer, \"20,111.2,22.3,333.3,44,555.5\", 0xffffff, \",\");\n\nwhile(tokenizer_has_more(t)) {\ndouble v = tokenizer_next_float(t, 0);\nlog_debug(\"%lf\\n\", v);\n}\n\ntokenizer_deinit(t);\n```", + "name": "tokenizer_t", + "level": 1 + }, + { + "params": [ + { + "type": "const char*", + "name": "data", + "desc": "JSON数据。" + }, + { + "type": "int32_t", + "name": "size", + "desc": "JSON数据长度。" + } + ], + "annotation": { + "global": true + }, + "desc": "", + "name": "conf_doc_load_json", + "return": { + "type": "conf_doc_t*", + "desc": "返回doc对象。" + }, + "type": "method", + "header": "conf_io/conf_json.h", + "level": 1 + }, + { + "params": [ + { + "type": "conf_doc_t*", + "name": "doc", + "desc": "doc对象。" + }, + { + "type": "str_t*", + "name": "str", + "desc": "保存结果。" + } + ], + "annotation": { + "global": true + }, + "desc": "", + "name": "conf_doc_save_json", + "return": { + "type": "object_t*", + "desc": "返回配置对象。" + }, + "type": "method", + "header": "conf_io/conf_json.h", + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "type": "uint32_t", + "name": "prealloc_nodes_nr", + "desc": "预先分配的节点数。" + } + ], + "annotation": {}, + "desc": "构造函数。", + "name": "conf_doc_create", + "return": { + "type": "conf_doc_t*", + "desc": "返回doc对象。" + } + }, + { + "params": [ + { + "type": "conf_doc_t*", + "name": "doc", + "desc": "文档对象。" + }, + { + "type": "const char*", + "name": "name", + "desc": "节点名称。" + } + ], + "annotation": {}, + "desc": "创建一个空节点。", + "name": "conf_doc_create_node", + "return": { + "type": "conf_node_t*", + "desc": "返回节点对象。" + } + }, + { + "params": [ + { + "type": "conf_doc_t*", + "name": "doc", + "desc": "文档对象。" + }, + { + "type": "conf_node_t*", + "name": "node", + "desc": "节点对象。" + } + ], + "annotation": {}, + "desc": "销毁节点对象。", + "name": "conf_doc_destroy_node", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "conf_doc_t*", + "name": "doc", + "desc": "文档对象。" + }, + { + "type": "conf_node_t*", + "name": "node", + "desc": "节点对象。" + }, + { + "type": "conf_node_t*", + "name": "sibling", + "desc": "待追加节点对象。" + } + ], + "annotation": {}, + "desc": "追加一个兄弟节点。", + "name": "conf_doc_append_sibling", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "conf_doc_t*", + "name": "doc", + "desc": "文档对象。" + }, + { + "type": "conf_node_t*", + "name": "node", + "desc": "节点对象。" + }, + { + "type": "conf_node_t*", + "name": "child", + "desc": "待追加节点对象。" + } + ], + "annotation": {}, + "desc": "追加一个子节点。", + "name": "conf_doc_append_child", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "conf_doc_t*", + "name": "doc", + "desc": "文档对象。" + }, + { + "type": "conf_node_t*", + "name": "node", + "desc": "节点对象。" + }, + { + "type": "conf_node_t*", + "name": "sibling", + "desc": "待删除节点对象。" + } + ], + "annotation": {}, + "desc": "删除指定的兄弟节点。", + "name": "conf_doc_remove_sibling", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "conf_doc_t*", + "name": "doc", + "desc": "文档对象。" + }, + { + "type": "conf_node_t*", + "name": "node", + "desc": "节点对象。" + }, + { + "type": "conf_node_t*", + "name": "child", + "desc": "待删除节点对象。" + } + ], + "annotation": {}, + "desc": "删除指定的子节点。", + "name": "conf_doc_remove_child", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "conf_doc_t*", + "name": "doc", + "desc": "文档对象。" + }, + { + "type": "conf_node_t*", + "name": "node", + "desc": "节点对象。" + }, + { + "type": "const char*", + "name": "name", + "desc": "待删除节点的名称。" + } + ], + "annotation": {}, + "desc": "删除指定的子节点。", + "name": "conf_doc_remove_child_by_name", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "conf_doc_t*", + "name": "doc", + "desc": "文档对象。" + }, + { + "type": "conf_node_t*", + "name": "node", + "desc": "节点对象。" + } + ], + "annotation": {}, + "desc": "删除全部子节点。", + "name": "conf_doc_remove_children", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "conf_doc_t*", + "name": "doc", + "desc": "文档对象。" + }, + { + "type": "const char*", + "name": "path", + "desc": "节点的路径。" + }, + { + "type": "const value_t*", + "name": "v", + "desc": "值。" + } + ], + "annotation": {}, + "desc": "设置指定路径节点的值。", + "name": "conf_doc_set", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "conf_doc_t*", + "name": "doc", + "desc": "文档对象。" + }, + { + "type": "const char*", + "name": "path", + "desc": "节点的路径。" + }, + { + "type": "int32_t", + "name": "v", + "desc": "值。" + } + ], + "annotation": {}, + "desc": "设置指定路径节点的值。", + "name": "conf_doc_set_int", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "conf_doc_t*", + "name": "doc", + "desc": "文档对象。" + }, + { + "type": "const char*", + "name": "path", + "desc": "节点的路径。" + }, + { + "type": "bool_t", + "name": "v", + "desc": "值。" + } + ], + "annotation": {}, + "desc": "设置指定路径节点的值。", + "name": "conf_doc_set_bool", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "conf_doc_t*", + "name": "doc", + "desc": "文档对象。" + }, + { + "type": "const char*", + "name": "path", + "desc": "节点的路径。" + }, + { + "type": "float", + "name": "v", + "desc": "值。" + } + ], + "annotation": {}, + "desc": "设置指定路径节点的值。", + "name": "conf_doc_set_float", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "conf_doc_t*", + "name": "doc", + "desc": "文档对象。" + }, + { + "type": "const char*", + "name": "path", + "desc": "节点的路径。" + }, + { + "type": "const char*", + "name": "v", + "desc": "值。" + } + ], + "annotation": {}, + "desc": "设置指定路径节点的值。", + "name": "conf_doc_set_str", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "conf_doc_t*", + "name": "doc", + "desc": "文档对象。" + }, + { + "type": "const char*", + "name": "path", + "desc": "节点的路径。" + }, + { + "type": "value_t*", + "name": "v", + "desc": "用于返回值。" + } + ], + "annotation": {}, + "desc": "获取指定路径节点的值。", + "name": "conf_doc_get", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "conf_doc_t*", + "name": "doc", + "desc": "文档对象。" + }, + { + "type": "const char*", + "name": "path", + "desc": "节点的路径。" + }, + { + "type": "int32_t", + "name": "defval", + "desc": "缺省值。" + } + ], + "annotation": {}, + "desc": "获取指定路径节点的值。", + "name": "conf_doc_get_int", + "return": { + "type": "int32_t", + "desc": "返回值。" + } + }, + { + "params": [ + { + "type": "conf_doc_t*", + "name": "doc", + "desc": "文档对象。" + }, + { + "type": "const char*", + "name": "path", + "desc": "节点的路径。" + }, + { + "type": "bool_t", + "name": "defval", + "desc": "缺省值。" + } + ], + "annotation": {}, + "desc": "获取指定路径节点的值。", + "name": "conf_doc_get_bool", + "return": { + "type": "bool_t", + "desc": "返回值。" + } + }, + { + "params": [ + { + "type": "conf_doc_t*", + "name": "doc", + "desc": "文档对象。" + }, + { + "type": "const char*", + "name": "path", + "desc": "节点的路径。" + }, + { + "type": "float", + "name": "defval", + "desc": "缺省值。" + } + ], + "annotation": {}, + "desc": "获取指定路径节点的值。", + "name": "conf_doc_get_float", + "return": { + "type": "float", + "desc": "返回值。" + } + }, + { + "params": [ + { + "type": "conf_doc_t*", + "name": "doc", + "desc": "文档对象。" + }, + { + "type": "const char*", + "name": "path", + "desc": "节点的路径。" + }, + { + "type": "const char*", + "name": "defval", + "desc": "缺省值。" + } + ], + "annotation": {}, + "desc": "获取指定路径节点的值。", + "name": "conf_doc_get_str", + "return": { + "type": "const char*", + "desc": "返回值。" + } + }, + { + "params": [ + { + "type": "conf_doc_t*", + "name": "doc", + "desc": "文档对象。" + }, + { + "type": "const char*", + "name": "path", + "desc": "节点的路径。" + } + ], + "annotation": {}, + "desc": "删除指定路径的节点。", + "name": "conf_doc_remove", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "conf_doc_t*", + "name": "doc", + "desc": "文档对象。" + }, + { + "type": "const char*", + "name": "path", + "desc": "节点的路径。" + } + ], + "annotation": {}, + "desc": "删除指定路径的节点的全部子节点。", + "name": "conf_doc_clear", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "conf_doc_t*", + "name": "doc", + "desc": "文档对象。" + }, + { + "type": "const char*", + "name": "path", + "desc": "节点的路径。" + } + ], + "annotation": {}, + "desc": "和前一个兄弟节点交换位置。", + "name": "conf_doc_move_up", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "conf_doc_t*", + "name": "doc", + "desc": "文档对象。" + }, + { + "type": "const char*", + "name": "path", + "desc": "节点的路径。" + } + ], + "annotation": {}, + "desc": "和后一个兄弟节点交换位置。", + "name": "conf_doc_move_down", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "conf_doc_t*", + "name": "doc", + "desc": "文档对象。" + }, + { + "type": "const char*", + "name": "path", + "desc": "节点的路径。" + } + ], + "annotation": {}, + "desc": "判断指定路径的节点是否存在。", + "name": "conf_doc_exists", + "return": { + "type": "bool_t", + "desc": "返回TRUE表示成功,FALSE表示失败。" + } + }, + { + "params": [ + { + "type": "conf_doc_t*", + "name": "doc", + "desc": "文档对象。" + }, + { + "type": "const char*", + "name": "path", + "desc": "节点的路径。" + } + ], + "annotation": {}, + "desc": "检查指定节点是否在兄弟节点中排第一。", + "name": "conf_doc_is_first", + "return": { + "type": "bool_t", + "desc": "返回TRUE表示是,否则表示不是。" + } + }, + { + "params": [ + { + "type": "conf_doc_t*", + "name": "doc", + "desc": "文档对象。" + }, + { + "type": "const char*", + "name": "path", + "desc": "节点的路径。" + } + ], + "annotation": {}, + "desc": "检查指定节点是否在兄弟节点中排最后。", + "name": "conf_doc_is_last", + "return": { + "type": "bool_t", + "desc": "返回TRUE表示是,否则表示不是。" + } + }, + { + "params": [ + { + "type": "conf_doc_t*", + "name": "doc", + "desc": "文档对象。" + }, + { + "type": "const char*", + "name": "path", + "desc": "节点的路径。" + } + ], + "annotation": {}, + "desc": "追加一个子节点。", + "name": "conf_doc_add_child", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "conf_doc_t*", + "name": "doc", + "desc": "文档对象。" + } + ], + "annotation": {}, + "desc": "析构函数。", + "name": "conf_doc_destroy", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + } + ], + "events": [], + "properties": [ + { + "name": "root", + "desc": "根节点。", + "type": "conf_node_t*" + } + ], + "header": "conf_io/conf_node.h", + "desc": "代表整个配置文件。", + "name": "conf_doc_t", + "level": 1 + }, + { + "type": "enum", + "desc": "节点类型。", + "consts": [ + { + "desc": "无效节点。", + "name": "CONF_NODE_NONE" + }, + { + "desc": "对象节点。", + "name": "CONF_NODE_OBJECT" + }, + { + "desc": "数组节点。", + "name": "CONF_NODE_ARRAY" + }, + { + "desc": "简单节点。", + "name": "CONF_NODE_SIMPLE" + } + ], + "header": "conf_io/conf_node.h", + "name": "conf_node_type_t", + "prefix": "CONF_NODE_", + "level": 1 + }, + { + "type": "enum", + "desc": "节点值得类型。", + "consts": [ + { + "desc": "无效类型。", + "name": "CONF_NODE_VALUE_NONE" + }, + { + "desc": "bool_t类型。", + "name": "CONF_NODE_VALUE_BOOL" + }, + { + "desc": "int8_t类型。", + "name": "CONF_NODE_VALUE_INT8" + }, + { + "desc": "uint8_t类型。", + "name": "CONF_NODE_VALUE_UINT8" + }, + { + "desc": "int16_t类型。", + "name": "CONF_NODE_VALUE_INT16" + }, + { + "desc": "uint16_t类型。", + "name": "CONF_NODE_VALUE_UINT16" + }, + { + "desc": "int32_t类型。", + "name": "CONF_NODE_VALUE_INT32" + }, + { + "desc": "uint32_t类型。", + "name": "CONF_NODE_VALUE_UINT32" + }, + { + "desc": "int64_t类型。", + "name": "CONF_NODE_VALUE_INT64" + }, + { + "desc": "uint64_t类型。", + "name": "CONF_NODE_VALUE_UINT64" + }, + { + "desc": "float类型。", + "name": "CONF_NODE_VALUE_FLOAT32" + }, + { + "desc": "double类型。", + "name": "CONF_NODE_VALUE_DOUBLE" + }, + { + "desc": "字符串类型。", + "name": "CONF_NODE_VALUE_STRING" + }, + { + "desc": "短字符(len<=7)串类型。", + "name": "CONF_NODE_VALUE_SMALL_STR" + }, + { + "desc": "节点类型。", + "name": "CONF_NODE_VALUE_NODE" + } + ], + "header": "conf_io/conf_node.h", + "name": "conf_node_value_t", + "prefix": "CONF_NODE_VALUE_", + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "type": "conf_node_t*", + "name": "node", + "desc": "节点对象。" + } + ], + "annotation": {}, + "desc": "获得节点的名称。", + "name": "conf_node_get_name", + "return": { + "type": "const char*", + "desc": "返回节点名称。" + } + }, + { + "params": [ + { + "type": "conf_node_t*", + "name": "node", + "desc": "节点对象。" + }, + { + "type": "const char*", + "name": "name", + "desc": "节点名称。" + } + ], + "annotation": {}, + "desc": "查找指定名称的子节点。", + "name": "conf_node_find_child", + "return": { + "type": "conf_node_t*", + "desc": "返回节点对象。" + } + }, + { + "params": [ + { + "type": "conf_node_t*", + "name": "node", + "desc": "节点对象。" + }, + { + "type": "const char*", + "name": "name", + "desc": "节点名称。" + } + ], + "annotation": {}, + "desc": "查找指定名称的兄弟节点。", + "name": "conf_node_find_sibling", + "return": { + "type": "conf_node_t*", + "desc": "返回节点对象。" + } + }, + { + "params": [ + { + "type": "conf_node_t*", + "name": "node", + "desc": "节点对象。" + }, + { + "type": "const value_t*", + "name": "v", + "desc": "值。" + } + ], + "annotation": {}, + "desc": "设置节点的值。", + "name": "conf_node_set_value", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "conf_node_t*", + "name": "node", + "desc": "节点对象。" + }, + { + "type": "value_t*", + "name": "v", + "desc": "值(返回)。" + } + ], + "annotation": {}, + "desc": "设置节点的值。", + "name": "conf_node_get_value", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "conf_node_t*", + "name": "node", + "desc": "节点对象。" + } + ], + "annotation": {}, + "desc": "获取第一个子节点。", + "name": "conf_node_get_first_child", + "return": { + "type": "conf_node_t*", + "desc": "返回第一个子节点。" + } + }, + { + "params": [ + { + "type": "conf_node_t*", + "name": "node", + "desc": "节点对象。" + }, + { + "type": "conf_node_t*", + "name": "child", + "desc": "子节点对象。" + } + ], + "annotation": {}, + "desc": "设置第一个子节点。", + "name": "conf_node_set_first_child", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + } + ], + "events": [], + "properties": [ + { + "name": "next", + "desc": "下一个兄弟节点。", + "type": "conf_node_t*" + }, + { + "name": "parent", + "desc": "父节点。", + "type": "conf_node_t*" + }, + { + "name": "value_type", + "desc": "值的类型。", + "type": "uint8_t" + }, + { + "name": "node_type", + "desc": "节点类型。", + "type": "uint8_t" + } + ], + "header": "conf_io/conf_node.h", + "desc": "节点。", + "name": "conf_node_t", + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [], + "annotation": { + "constructor": true + }, + "desc": "获取缺省的定时器管理器。", + "name": "timer_manager", + "return": { + "type": "timer_manager_t*", + "desc": "返回定时器管理器对象。" + } + }, + { + "params": [ + { + "type": "timer_manager_t*", + "name": "timer_manager_t", + "desc": "定时器管理器对象。" + } + ], + "annotation": {}, + "desc": "设置缺省的定时器管理器。", + "name": "timer_manager_set", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "timer_get_time_t", + "name": "get_time", + "desc": "获取当前时间的函数。" + } + ], + "annotation": { + "constructor": true + }, + "desc": "创建定时器管理器。", + "name": "timer_manager_create", + "return": { + "type": "timer_manager_t*", + "desc": "返回定时器管理器对象。" + } + }, + { + "params": [ + { + "type": "timer_manager_t*", + "name": "timer_manager", + "desc": "定时器管理器对象。" + }, + { + "type": "timer_get_time_t", + "name": "get_time", + "desc": "获取当前时间的函数。" + } + ], + "annotation": { + "constructor": true + }, + "desc": "初始化定时器管理器。", + "name": "timer_manager_init", + "return": { + "type": "timer_manager_t*", + "desc": "返回定时器管理器对象。" + } + }, + { + "params": [ + { + "type": "timer_manager_t*", + "name": "timer_manager", + "desc": "定时器管理器对象。" + } + ], + "annotation": {}, + "desc": "析构定时器管理器。", + "name": "timer_manager_deinit", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "timer_manager_t*", + "name": "timer_manager", + "desc": "定时器管理器对象。" + } + ], + "annotation": {}, + "desc": "析构并释放定时器管理器。", + "name": "timer_manager_destroy", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "timer_manager_t*", + "name": "timer_manager", + "desc": "定时器管理器对象。" + }, + { + "type": "timer_func_t*", + "name": "on_timer", + "desc": "timer回调函数。" + }, + { + "type": "void*", + "name": "ctx", + "desc": "timer回调函数的上下文。" + }, + { + "type": "uint32_t", + "name": "duration", + "desc": "时间。" + } + ], + "annotation": {}, + "desc": "添加定时器。", + "name": "timer_manager_add", + "return": { + "type": "uint32_t", + "desc": "返回timer的ID,TK_INVALID_ID表示失败。" + } + }, + { + "params": [ + { + "type": "timer_manager_t*", + "name": "timer_manager", + "desc": "定时器管理器对象。" + }, + { + "type": "uint32_t", + "name": "timer_id", + "desc": "timer_id。" + } + ], + "annotation": {}, + "desc": "根据id删除定时器。", + "name": "timer_manager_remove", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "timer_manager_t*", + "name": "timer_manager", + "desc": "定时器管理器对象。" + }, + { + "type": "uint32_t*", + "name": "timer_id", + "desc": "timer_id。" + } + ], + "annotation": {}, + "desc": "重置定时器。", + "name": "timer_manager_reset", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "timer_manager_t*", + "name": "timer_manager", + "desc": "定时器管理器对象。" + }, + { + "type": "uint32_t", + "name": "timer_id", + "desc": "timer_id" + } + ], + "annotation": {}, + "desc": "查找指定ID的定时器。", + "name": "timer_manager_find", + "return": { + "type": "timer_info_t*", + "desc": "返回timer的信息。" + } + }, + { + "params": [ + { + "type": "timer_manager_t*", + "name": "timer_manager", + "desc": "定时器管理器对象。" + } + ], + "annotation": {}, + "desc": "返回定时器的个数。", + "name": "timer_manager_count", + "return": { + "type": "uint32_t", + "desc": "返回timer的个数。" + } + }, + { + "params": [ + { + "type": "timer_manager_t*", + "name": "timer_manager", + "desc": "定时器管理器对象。" + } + ], + "annotation": {}, + "desc": "返回最近的定时器到期时间。", + "name": "timer_manager_next_time", + "return": { + "type": "uint64_t", + "desc": "返回最近的timer到期时间。" + } + }, + { + "params": [ + { + "type": "timer_manager_t*", + "name": "timer_manager", + "desc": "定时器管理器对象。。" + }, + { + "type": "timer_info_t*", + "name": "timer", + "desc": "timer对象。" + } + ], + "annotation": {}, + "desc": "追加定时器。", + "name": "timer_manager_append", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + } + ], + "events": [], + "properties": [], + "header": "tkc/timer_manager.h", + "desc": "定时器管理器。", + "name": "timer_manager_t", + "annotation": { + "scriptable": true + }, + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [], + "annotation": { + "scriptable": true, + "static": true + }, + "desc": "获取当前时间(秒)。", + "name": "time_now_s", + "return": { + "type": "uint64_t", + "desc": "返回当前时间(秒)。" + } + }, + { + "params": [], + "annotation": { + "scriptable": true, + "static": true + }, + "desc": "获取当前时间(毫秒)。", + "name": "time_now_ms", + "return": { + "type": "uint64_t", + "desc": "返回当前时间(毫秒)。" + } + }, + { + "params": [], + "annotation": { + "scriptable": true, + "static": true + }, + "desc": "获取当前时间(微秒)。", + "name": "time_now_us", + "return": { + "type": "uint64_t", + "desc": "返回当前时间(微秒)。" + } + } + ], + "events": [], + "properties": [], + "header": "tkc/time_now.h", + "desc": "获取当前时间的函数。\n这里的当前时间是相对的,在嵌入式系统一般相对于开机时间。\n它本身并没有任何意义,一般用来计算时间间隔,如实现定时器和动画等等。", + "name": "time_now_t", + "annotation": { + "scriptable": true, + "fake": true + }, + "level": 1 + }, + { + "params": [ + { + "type": "const void*", + "name": "data", + "desc": "数据。" + }, + { + "type": "uint32_t", + "name": "size", + "desc": "数据长度。" + } + ], + "annotation": { + "global": true + }, + "desc": "从缓存区加载ubjson格式的conf doc对象。", + "name": "conf_doc_load_ubjson", + "return": { + "type": "conf_doc_t*", + "desc": "返回conf_doc对象。" + }, + "type": "method", + "header": "conf_io/conf_ubjson.h", + "level": 1 + }, + { + "params": [ + { + "type": "conf_doc_t*", + "name": "doc", + "desc": "conf doc对象。" + }, + { + "type": "ubjson_writer_t*", + "name": "writer", + "desc": "ubjson writer对象。" + } + ], + "annotation": { + "global": true + }, + "desc": "保存conf doc对象为ubjson格式。", + "name": "conf_doc_save_ubjson", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败" + }, + "type": "method", + "header": "conf_io/conf_ubjson.h", + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "type": "tk_thread_entry_t", + "name": "entry", + "desc": "线程函数。" + }, + { + "type": "void*", + "name": "args", + "desc": "线程函数的上下文。" + } + ], + "annotation": {}, + "desc": "创建thread对象。", + "name": "tk_thread_create", + "return": { + "type": "tk_thread_t*", + "desc": "thread对象。" + } + }, + { + "params": [ + { + "type": "tk_thread_t*", + "name": "thread", + "desc": "thread对象。" + }, + { + "type": "const char*", + "name": "name", + "desc": "名称。" + } + ], + "annotation": {}, + "desc": "设置线程的名称。\n\n> 需要在调用start之前调用本函数。", + "name": "tk_thread_set_name", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "tk_thread_t*", + "name": "thread", + "desc": "thread对象。" + }, + { + "type": "uint32_t", + "name": "stack_size", + "desc": "栈的大小。" + } + ], + "annotation": {}, + "desc": "设置线程的栈大小。\n\n> 需要在调用start之前调用本函数。", + "name": "tk_thread_set_stack_size", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "tk_thread_t*", + "name": "thread", + "desc": "thread对象。" + }, + { + "type": "uint32_t", + "name": "priority", + "desc": "优先级。" + } + ], + "annotation": {}, + "desc": "设置线程的优先级。\n\n> 部分平台支持。", + "name": "tk_thread_set_priority", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "tk_thread_t*", + "name": "thread", + "desc": "thread对象。" + } + ], + "annotation": {}, + "desc": "启动线程。", + "name": "tk_thread_start", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "tk_thread_t*", + "name": "thread", + "desc": "thread对象。" + } + ], + "annotation": {}, + "desc": "等待线程退出。\n必须调用 tk_thread_destroy 函数来释放线程资源,以免出现内存泄漏的问题。", + "name": "tk_thread_join", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "tk_thread_t*", + "name": "thread", + "desc": "thread对象。" + } + ], + "annotation": {}, + "desc": "获取线程的参数。", + "name": "tk_thread_get_args", + "return": { + "type": "void*", + "desc": "返回线程的参数。" + } + }, + { + "params": [ + { + "type": "tk_thread_t*", + "name": "thread", + "desc": "thread对象。" + } + ], + "annotation": {}, + "desc": "销毁thread对象。\n在销毁对象前必须调用 tk_thread_join 函数等待退出线程", + "name": "tk_thread_destroy", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [], + "annotation": {}, + "desc": "获取当前线程的原生句柄。", + "name": "tk_thread_self", + "return": { + "type": "uint64_t", + "desc": "返回当前线程的原生句柄。" + } + } + ], + "events": [], + "properties": [], + "header": "tkc/thread.h", + "desc": "线程对象。", + "name": "tk_thread_t", + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "type": "str_t*", "name": "str", "desc": "str对象。" }, @@ -39315,28 +28052,72 @@ "constructor": true }, "desc": "初始化字符串对象。", - "name": "wstr_init", + "name": "str_init", "return": { - "type": "wstr_t*", + "type": "str_t*", "desc": "str对象本身。" } }, { "params": [ { - "type": "wstr_t*", + "type": "str_t*", "name": "str", "desc": "str对象。" }, { - "type": "wchar_t*", + "type": "uint32_t", + "name": "capacity", + "desc": "初始容量。" + } + ], + "annotation": { + "constructor": true + }, + "desc": "扩展字符串到指定的容量。", + "name": "str_extend", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "str_t*", + "name": "str", + "desc": "str对象。" + }, + { + "type": "char*", + "name": "text", + "desc": "待比较的字符串。" + } + ], + "annotation": {}, + "desc": "判断两个字符串是否相等。", + "name": "str_eq", + "return": { + "type": "bool_t", + "desc": "返回是否相等。" + } + }, + { + "params": [ + { + "type": "str_t*", + "name": "str", + "desc": "str对象。" + }, + { + "type": "char*", "name": "text", "desc": "要设置的字符串。" } ], "annotation": {}, "desc": "设置字符串。", - "name": "wstr_set", + "name": "str_set", "return": { "type": "ret_t", "desc": "返回RET_OK表示成功,否则表示失败。" @@ -39345,14 +28126,14 @@ { "params": [ { - "type": "wstr_t*", + "type": "str_t*", "name": "str", "desc": "str对象。" } ], "annotation": {}, "desc": "清除字符串内容。", - "name": "wstr_clear", + "name": "str_clear", "return": { "type": "ret_t", "desc": "返回RET_OK表示成功,否则表示失败。" @@ -39361,7 +28142,7 @@ { "params": [ { - "type": "wstr_t*", + "type": "str_t*", "name": "str", "desc": "str对象。" }, @@ -39369,11 +28150,16 @@ "type": "char*", "name": "text", "desc": "要设置的字符串。" + }, + { + "type": "uint32_t", + "name": "len", + "desc": "字符串长度。" } ], "annotation": {}, - "desc": "设置UTF8字符串。", - "name": "wstr_set_utf8", + "desc": "设置字符串。", + "name": "str_set_with_len", "return": { "type": "ret_t", "desc": "返回RET_OK表示成功,否则表示失败。" @@ -39382,102 +28168,19 @@ { "params": [ { - "type": "wstr_t*", + "type": "str_t*", "name": "str", "desc": "str对象。" }, { "type": "char*", "name": "text", - "desc": "返回的字符串。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "text最大长度。" - } - ], - "annotation": {}, - "desc": "获取UTF8字符串。", - "name": "wstr_get_utf8", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "wstr_t*", - "name": "str", - "desc": "str对象。" - }, - { - "type": "uint32_t", - "name": "offset", - "desc": "指定的位置。" - }, - { - "type": "uint32_t", - "name": "nr", - "desc": "要删除的字符数。" - } - ], - "annotation": {}, - "desc": "删除指定范围的字符。", - "name": "wstr_remove", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "wstr_t*", - "name": "str", - "desc": "str对象。" - }, - { - "type": "uint32_t", - "name": "offset", - "desc": "指定的位置。" - }, - { - "type": "wchar_t*", - "name": "text", - "desc": "待插入的文本。" - }, - { - "type": "uint32_t", - "name": "nr", - "desc": "要插入的字符数。" - } - ], - "annotation": {}, - "desc": "在指定位置插入字符串。", - "name": "wstr_insert", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "wstr_t*", - "name": "str", - "desc": "str对象。" - }, - { - "type": "wchar_t*", - "name": "text", "desc": "要追加的字符串。" } ], "annotation": {}, "desc": "追加字符串。", - "name": "wstr_append", + "name": "str_append", "return": { "type": "ret_t", "desc": "返回RET_OK表示成功,否则表示失败。" @@ -39486,12 +28189,33 @@ { "params": [ { - "type": "wstr_t*", + "type": "str_t*", "name": "str", "desc": "str对象。" }, { - "type": "wchar_t*", + "type": "char*", + "name": "text", + "desc": "要追加的字符串。" + } + ], + "annotation": {}, + "desc": "追加多个字符串。以NULL结束。\n\n示例:\n\n```c\nstr_t s;\nstr_init(&s, 0);\n\nstr_append_more(&s, \"abc\", \"123\", NULL);\nlog_debug(\"%s\\n\", s.str);\n\nstr_reset(&s);\n```", + "name": "str_append_more", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "str_t*", + "name": "str", + "desc": "str对象。" + }, + { + "type": "char*", "name": "text", "desc": "要追加的字符串。" }, @@ -39503,7 +28227,7 @@ ], "annotation": {}, "desc": "追加字符串。", - "name": "wstr_append_with_len", + "name": "str_append_with_len", "return": { "type": "ret_t", "desc": "返回RET_OK表示成功,否则表示失败。" @@ -39512,19 +28236,102 @@ { "params": [ { - "type": "wstr_t*", + "type": "str_t*", "name": "str", "desc": "str对象。" }, { - "type": "wchar_t", + "type": "uint32_t", + "name": "offset", + "desc": "偏移量。" + }, + { + "type": "char*", + "name": "text", + "desc": "要插入的字符串。" + } + ], + "annotation": {}, + "desc": "插入子字符串。", + "name": "str_insert", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "str_t*", + "name": "str", + "desc": "str对象。" + }, + { + "type": "uint32_t", + "name": "offset", + "desc": "偏移量。" + }, + { + "type": "char*", + "name": "text", + "desc": "要插入的字符串。" + }, + { + "type": "uint32_t", + "name": "len", + "desc": "字符串长度。" + } + ], + "annotation": {}, + "desc": "插入子字符串。", + "name": "str_insert_with_len", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "str_t*", + "name": "str", + "desc": "str对象。" + }, + { + "type": "uint32_t", + "name": "offset", + "desc": "偏移量。" + }, + { + "type": "uint32_t", + "name": "len", + "desc": "长度。" + } + ], + "annotation": {}, + "desc": "删除子字符串。", + "name": "str_remove", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "str_t*", + "name": "str", + "desc": "str对象。" + }, + { + "type": "char", "name": "c", - "desc": "字符。" + "desc": "要追加的字符。" } ], "annotation": {}, "desc": "追加一个字符。", - "name": "wstr_push", + "name": "str_append_char", "return": { "type": "ret_t", "desc": "返回RET_OK表示成功,否则表示失败。" @@ -39533,14 +28340,19 @@ { "params": [ { - "type": "wstr_t*", + "type": "str_t*", "name": "str", "desc": "str对象。" + }, + { + "type": "int32_t", + "name": "value", + "desc": "要追加的整数。" } ], "annotation": {}, - "desc": "删除尾部字符。", - "name": "wstr_pop", + "desc": "追加一个整数。", + "name": "str_append_int", "return": { "type": "ret_t", "desc": "返回RET_OK表示成功,否则表示失败。" @@ -39549,24 +28361,24 @@ { "params": [ { - "type": "wstr_t*", + "type": "str_t*", "name": "str", "desc": "str对象。" }, { "type": "const char*", "name": "format", - "desc": "格式(用于snprintf格式化数值)" + "desc": "格式。" }, { - "type": "int32_t", + "type": "double", "name": "value", - "desc": "数值。" + "desc": "要追加的浮点数。" } ], "annotation": {}, - "desc": "追加一个整数。", - "name": "wstr_push_int", + "desc": "追加一个浮点数。", + "name": "str_append_double", "return": { "type": "ret_t", "desc": "返回RET_OK表示成功,否则表示失败。" @@ -39575,28 +28387,211 @@ { "params": [ { - "type": "wstr_t*", + "type": "str_t*", "name": "str", "desc": "str对象。" }, { - "type": "wstr_t*", - "name": "other", - "desc": "str对象。" + "type": "const char*", + "name": "json_str", + "desc": "待追加的字符串。" } ], "annotation": {}, - "desc": "判断两个字符是否相同。", - "name": "wstr_equal", + "desc": "追加一个字符串,字符串前后加英文双引号,字符串本身的双引号被转义为\\\"。", + "name": "str_append_json_str", "return": { - "type": "bool_t", - "desc": "返回TRUE表示相同,否则表示不同。" + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" } }, { "params": [ { - "type": "wstr_t*", + "type": "str_t*", + "name": "str", + "desc": "str对象。" + }, + { + "type": "const char*", + "name": "key", + "desc": "键。" + }, + { + "type": "int32_t", + "name": "value", + "desc": "值。" + } + ], + "annotation": {}, + "desc": "追加int格式的json键值对。", + "name": "str_append_json_int_pair", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "str_t*", + "name": "str", + "desc": "str对象。" + }, + { + "type": "const char*", + "name": "key", + "desc": "键。" + }, + { + "type": "const char*", + "name": "value", + "desc": "值。" + } + ], + "annotation": {}, + "desc": "追加字符串格式的json键值对。", + "name": "str_append_json_str_pair", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "str_t*", + "name": "str", + "desc": "str对象。" + }, + { + "type": "const char*", + "name": "key", + "desc": "键。" + }, + { + "type": "double", + "name": "value", + "desc": "值。" + } + ], + "annotation": {}, + "desc": "追加doube格式的json键值对。", + "name": "str_append_json_double_pair", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "str_t*", + "name": "str", + "desc": "str对象。" + }, + { + "type": "const char*", + "name": "key", + "desc": "键。" + }, + { + "type": "bool_t", + "name": "value", + "desc": "值。" + } + ], + "annotation": {}, + "desc": "追加bool格式的json键值对。", + "name": "str_append_json_bool_pair", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "str_t*", + "name": "str", + "desc": "str对象。" + } + ], + "annotation": {}, + "desc": "删除最后一个字符。", + "name": "str_pop", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "str_t*", + "name": "str", + "desc": "str对象。" + } + ], + "annotation": {}, + "desc": "对字符串进行反转义。如:把\"\\n\"转换成'\\n'。", + "name": "str_unescape", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "str_t*", + "name": "str", + "desc": "str对象。" + }, + { + "type": "char*", + "name": "text", + "desc": "要解码的XML文本。" + } + ], + "annotation": {}, + "desc": "对XML基本的entity进行解码,目前仅支持<>"a;&。", + "name": "str_decode_xml_entity", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "str_t*", + "name": "str", + "desc": "str对象。" + }, + { + "type": "char*", + "name": "text", + "desc": "要解码的XML文本。" + }, + { + "type": "uint32_t", + "name": "len", + "desc": "字符串长度。" + } + ], + "annotation": {}, + "desc": "对XML基本的entity进行解码,目前仅支持<>"a;&。", + "name": "str_decode_xml_entity_with_len", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "str_t*", "name": "str", "desc": "str对象。" }, @@ -39608,7 +28603,7 @@ ], "annotation": {}, "desc": "用整数初始化字符串。", - "name": "wstr_from_int", + "name": "str_from_int", "return": { "type": "ret_t", "desc": "返回RET_OK表示成功,否则表示失败。" @@ -39617,7 +28612,7 @@ { "params": [ { - "type": "wstr_t*", + "type": "str_t*", "name": "str", "desc": "str对象。" }, @@ -39629,7 +28624,7 @@ ], "annotation": {}, "desc": "用浮点数初始化字符串。", - "name": "wstr_from_float", + "name": "str_from_float", "return": { "type": "ret_t", "desc": "返回RET_OK表示成功,否则表示失败。" @@ -39638,7 +28633,7 @@ { "params": [ { - "type": "wstr_t*", + "type": "str_t*", "name": "str", "desc": "str对象。" }, @@ -39650,7 +28645,7 @@ ], "annotation": {}, "desc": "用value初始化字符串。", - "name": "wstr_from_value", + "name": "str_from_value", "return": { "type": "ret_t", "desc": "返回RET_OK表示成功,否则表示失败。" @@ -39659,7 +28654,54 @@ { "params": [ { - "type": "wstr_t*", + "type": "str_t*", + "name": "str", + "desc": "str对象。" + }, + { + "type": "wchar_t*", + "name": "wstr", + "desc": "Unicode字符串。" + } + ], + "annotation": {}, + "desc": "用value初始化字符串。", + "name": "str_from_wstr", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "str_t*", + "name": "str", + "desc": "str对象。" + }, + { + "type": "wchar_t*", + "name": "wstr", + "desc": "Unicode字符串" + }, + { + "type": "uint32_t", + "name": "len", + "desc": "Unicode字符串的长度。" + } + ], + "annotation": {}, + "desc": "用value初始化字符串。", + "name": "str_from_wstr_with_len", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "str_t*", "name": "str", "desc": "str对象。" }, @@ -39671,7 +28713,7 @@ ], "annotation": {}, "desc": "将字符串转成整数。", - "name": "wstr_to_int", + "name": "str_to_int", "return": { "type": "ret_t", "desc": "返回RET_OK表示成功,否则表示失败。" @@ -39680,7 +28722,7 @@ { "params": [ { - "type": "wstr_t*", + "type": "str_t*", "name": "str", "desc": "str对象。" }, @@ -39692,7 +28734,7 @@ ], "annotation": {}, "desc": "将字符串转成浮点数。", - "name": "wstr_to_float", + "name": "str_to_float", "return": { "type": "ret_t", "desc": "返回RET_OK表示成功,否则表示失败。" @@ -39701,19 +28743,29 @@ { "params": [ { - "type": "wstr_t*", + "type": "str_t*", "name": "str", "desc": "str对象。" }, { - "type": "double", - "name": "delta", - "desc": "要加上的值。" + "type": "const uint8_t*", + "name": "data", + "desc": "数据。" + }, + { + "type": "uint32_t", + "name": "size", + "desc": "数据长度。" + }, + { + "type": "const char*", + "name": "format", + "desc": "格式(如:\"%02x\" 表示生成小写)" } ], "annotation": {}, - "desc": "将字符串转成浮点数,加上delta,再转换回来。", - "name": "wstr_add_float", + "desc": "把二进制的数据编码成16进制格式的字符串。", + "name": "str_encode_hex", "return": { "type": "ret_t", "desc": "返回RET_OK表示成功,否则表示失败。" @@ -39722,35 +28774,61 @@ { "params": [ { - "type": "wstr_t*", - "name": "str", - "desc": "str对象。" - } - ], - "annotation": {}, - "desc": "去掉浮点数小数点尾部的零。", - "name": "wstr_trim_float_zero", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "wstr_t*", + "type": "str_t*", "name": "str", "desc": "str对象。" }, { - "type": "wchar_t", - "name": "newline", - "desc": "换行符。" + "type": "char*", + "name": "text", + "desc": "子字符串。" } ], "annotation": {}, - "desc": "规范化换行符。", - "name": "wstr_normalize_newline", + "desc": "判断字符串是否以指定的子串结尾。", + "name": "str_end_with", + "return": { + "type": "bool_t", + "desc": "返回是否以指定的子串结尾。" + } + }, + { + "params": [ + { + "type": "str_t*", + "name": "str", + "desc": "str对象。" + }, + { + "type": "char*", + "name": "text", + "desc": "子字符串。" + } + ], + "annotation": {}, + "desc": "判断字符串是否以指定的子串开头。", + "name": "str_start_with", + "return": { + "type": "bool_t", + "desc": "返回是否以指定的子串开头。" + } + }, + { + "params": [ + { + "type": "str_t*", + "name": "str", + "desc": "str对象。" + }, + { + "type": "char*", + "name": "text", + "desc": "要去除的字符集合。" + } + ], + "annotation": {}, + "desc": "去除首尾指定的字符。", + "name": "str_trim", "return": { "type": "ret_t", "desc": "返回RET_OK表示成功,否则表示失败。" @@ -39759,35 +28837,130 @@ { "params": [ { - "type": "wstr_t*", + "type": "str_t*", "name": "str", "desc": "str对象。" }, { - "type": "wchar_t", - "name": "c", - "desc": "字符。" + "type": "char*", + "name": "text", + "desc": "要去除的字符集合。" } ], "annotation": {}, - "desc": "统计指定字符的个数。", - "name": "wstr_count_char", + "desc": "去除首部指定的字符。", + "name": "str_trim_left", "return": { - "type": "uint32_t", - "desc": "返回指定字符的个数。" + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" } }, { "params": [ { - "type": "wstr_t*", + "type": "str_t*", + "name": "str", + "desc": "str对象。" + }, + { + "type": "char*", + "name": "text", + "desc": "要去除的字符集合。" + } + ], + "annotation": {}, + "desc": "去除尾部指定的字符。", + "name": "str_trim_right", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "str_t*", + "name": "str", + "desc": "str对象。" + }, + { + "type": "char*", + "name": "text", + "desc": "待替换的子串。" + }, + { + "type": "char*", + "name": "new_text", + "desc": "将替换成的子串。" + } + ], + "annotation": {}, + "desc": "字符串替换。", + "name": "str_replace", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "str_t*", + "name": "str", + "desc": "str对象。" + } + ], + "annotation": {}, + "desc": "将字符串转成小写。", + "name": "str_to_lower", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "str_t*", + "name": "str", + "desc": "str对象。" + } + ], + "annotation": {}, + "desc": "将字符串转成大写。", + "name": "str_to_upper", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "str_t*", + "name": "str", + "desc": "str对象。" + } + ], + "annotation": {}, + "desc": "将字符串中的变量展开为obj中对应的属性值。\n\n变量的格式为${xxx}:\n\n* xxx为变量名时,${xxx}被展开为obj的属性xxx的值。\n* xxx为表达式时,${xxx}被展开为表达式的值,表达式中可以用变量,$为变量的前缀,如${$x+$y}。\n* xxx为变量名时,而不存在obj的属性时,${xxx}被移出。", + "name": "str_expand_vars", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "str_t*", "name": "str", "desc": "str对象。" } ], "annotation": {}, "desc": "重置字符串为空。", - "name": "wstr_reset", + "name": "str_reset", "return": { "type": "ret_t", "desc": "返回RET_OK表示成功,否则表示失败。" @@ -39815,135 +28988,15 @@ { "name": "str", "desc": "字符串。", - "type": "wchar_t*", + "type": "char*", "annotation": { "readable": true } } ], - "header": "tkc/wstr.h", - "desc": "可变长度的宽字符字符串。\n\n示例:\n\n```c\nwstr_t s;\nwstr_init(&s, 0);\n\nwstr_append(&s, L\"abc\");\nwstr_append(&s, L\"123\");\n\nwstr_reset(&s);\n```\n> 先调wstr\\_init进行初始化,最后调用wstr\\_reset释放内存。", - "name": "wstr_t", - "level": 1 - }, - { - "params": [ - { - "type": "const wchar_t*", - "name": "s", - "desc": "wchar_t*。" - }, - { - "type": "wchar_t", - "name": "c", - "desc": "wchar_t。" - } - ], - "annotation": { - "global": true - }, - "desc": "查找字符位置", - "name": "wcs_chr", - "return": { - "type": "const wchar_t*", - "desc": "返回找到c的地址。" - }, - "type": "method", - "header": "tkc/wstr.h", - "level": 1 - }, - { - "params": [ - { - "type": "wchar_t*", - "name": "s1", - "desc": "目标串。" - }, - { - "type": "const wchar_t*", - "name": "s2", - "desc": "源串。" - } - ], - "annotation": { - "global": true - }, - "desc": "复制字符串", - "name": "wcs_cpy", - "return": { - "type": "const wchar_t*", - "desc": "复制后的串地址。" - }, - "type": "method", - "header": "tkc/wstr.h", - "level": 1 - }, - { - "params": [ - { - "type": "const wchar_t*", - "name": "s1", - "desc": "目标串。" - }, - { - "type": "const wchar_t*", - "name": "s2", - "desc": "源串。" - } - ], - "annotation": { - "global": true - }, - "desc": "比较字符串", - "name": "wcs_cmp", - "return": { - "type": "int", - "desc": "小于0表示s1s2。" - }, - "type": "method", - "header": "tkc/wstr.h", - "level": 1 - }, - { - "params": [ - { - "type": "const wchar_t*", - "name": "s", - "desc": "串地址。" - } - ], - "annotation": { - "global": true - }, - "desc": "获取字符串长度。", - "name": "wcs_len", - "return": { - "type": "size_t", - "desc": "返回串长度'\\0'结尾。" - }, - "type": "method", - "header": "tkc/wstr.h", - "level": 1 - }, - { - "params": [ - { - "type": "const wchar_t*", - "name": "s", - "desc": "源字符串。" - } - ], - "annotation": { - "global": true - }, - "desc": "获取一个新的内存保存s串。", - "name": "wcs_dup", - "return": { - "type": "wchar_t*", - "desc": "返回新的字符串地址。" - }, - "type": "method", - "header": "tkc/wstr.h", + "header": "tkc/str.h", + "desc": "可变长度的UTF8字符串。\n\n示例:\n\n```c\nstr_t s;\nstr_init(&s, 0);\n\nstr_append(&s, \"abc\");\nstr_append(&s, \"123\");\nlog_debug(\"%s\\n\", s.str);\n\nstr_reset(&s);\n```\n\n> 先调str\\_init进行初始化,最后调用str\\_reset释放内存。", + "name": "str_t", "level": 1 }, { @@ -39952,88 +29005,111 @@ { "params": [ { - "type": "void*", - "name": "data", - "desc": "数据。" + "type": "const str_str_t*", + "name": "items", + "desc": "str_str_t数组。" }, { - "type": "uint32_t", - "name": "size", - "desc": "数据的长度。" - }, - { - "type": "ubjson_on_key_value_t", - "name": "on_key_value", - "desc": "回调函数。" - }, - { - "type": "void*", - "name": "ctx", - "desc": "回调函数的上下文。" + "type": "const char*", + "name": "name", + "desc": "name。" } ], - "annotation": { - "static": true - }, - "desc": "解析ubjson数据,遇到key/value时调用提供的回调函数。", - "name": "ubjson_parse", + "annotation": {}, + "desc": "根据name获取对应的value。", + "name": "str_str_value", "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" + "type": "const char*", + "desc": "返回value。" } }, { "params": [ { - "type": "void*", - "name": "data", - "desc": "数据。" + "type": "const str_str_t*", + "name": "items", + "desc": "str_str_t数组。" }, { - "type": "uint32_t", - "name": "size", - "desc": "数据的长度。" + "type": "const char*", + "name": "value", + "desc": "value" } ], - "annotation": { - "static": true - }, - "desc": "解析ubjson数据,生成object对象。", - "name": "ubjson_to_object", + "annotation": {}, + "desc": "根据value获取对应的name。", + "name": "str_str_name", "return": { - "type": "void*", - "desc": "返回object表示的数据。" - } - }, - { - "params": [ - { - "type": "void*", - "name": "data", - "desc": "数据。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "数据的长度。" - } - ], - "annotation": { - "static": true - }, - "desc": "将ubjson数据打印到控制台。", - "name": "ubjson_dump", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" + "type": "const char*", + "desc": "返回name。" } } ], "events": [], "properties": [], - "header": "ubjson/ubjson_parser.h", - "desc": "ubjson parser", - "name": "ubjson_parser_t", + "header": "tkc/str_str.h", + "desc": "字符串-字符串类型。\n\n负责把一个字符串映射成另外一个字符串。\n\n示例:\n\n```c\nstatic const str_str_t color_values[] = {{\"1\", \"red\"}, {\"2\", \"black\"}, {\"3\", \"blue\"}, {\"4\", \"white\"}};\nconst char* value = str_str_value(color_values, \"3\");\nconst char* name = str_str_name(color_values, \"blue\", \"0\");\nprintf(\"value = %s \\n\", value);\nprintf(\"name = %s \\n\", name);\n```", + "name": "str_str_t", + "annotation": { + "fake": true + }, + "level": 1 + }, + { + "params": [], + "annotation": { + "global": true + }, + "desc": "注册控件。", + "name": "table_view_register", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + }, + "type": "method", + "header": "custom_widgets/table_view_register.h", + "level": 1 + }, + { + "params": [], + "annotation": { + "global": true + }, + "desc": "获取支持的渲染模式。", + "name": "table_view_supported_render_mode", + "return": { + "type": "const char*", + "desc": "返回渲染模式。" + }, + "type": "method", + "header": "custom_widgets/table_view_register.h", + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "type": "int*", + "name": "socks", + "desc": "由于返回生成的socket句柄。" + } + ], + "annotation": {}, + "desc": "生成两个socket句柄。两者可以模拟客户端和服务器通信。", + "name": "tk_socketpair", + "return": { + "type": "int", + "desc": "小于0表示失败。" + } + } + ], + "events": [], + "properties": [], + "header": "tkc/socket_pair.h", + "desc": "socketpair", + "name": "socketpair_t", "annotation": { "fake": true }, @@ -40044,967 +29120,44 @@ "methods": [ { "params": [ - { - "type": "ubjson_writer_t*", - "name": "writer", - "desc": "writer对象。" - }, - { - "type": "ubjson_write_callback_t", - "name": "write", - "desc": "真正写入数据的函数。" - }, - { - "type": "void*", - "name": "ctx", - "desc": "write函数的上下文。" - } - ], - "annotation": {}, - "desc": "初始化。", - "name": "ubjson_writer_init", - "return": { - "type": "ubjson_writer_t*", - "desc": "返回writer对象。" - } - }, - { - "params": [ - { - "type": "ubjson_writer_t*", - "name": "writer", - "desc": "writer对象。" - }, - { - "type": "const char*", - "name": "value", - "desc": "key的名称。" - } - ], - "annotation": {}, - "desc": "写入key。", - "name": "ubjson_writer_write_key", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "ubjson_writer_t*", - "name": "writer", - "desc": "writer对象。" - } - ], - "annotation": {}, - "desc": "写入null。", - "name": "ubjson_writer_write_null", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "ubjson_writer_t*", - "name": "writer", - "desc": "writer对象。" - } - ], - "annotation": {}, - "desc": "写入noop。", - "name": "ubjson_writer_write_noop", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "ubjson_writer_t*", - "name": "writer", - "desc": "writer对象。" - } - ], - "annotation": {}, - "desc": "写入true。", - "name": "ubjson_writer_write_true", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "ubjson_writer_t*", - "name": "writer", - "desc": "writer对象。" - } - ], - "annotation": {}, - "desc": "写入false。", - "name": "ubjson_writer_write_false", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "ubjson_writer_t*", - "name": "writer", - "desc": "writer对象。" - }, - { - "type": "int32_t", - "name": "value", - "desc": "要写入的值。" - } - ], - "annotation": {}, - "desc": "写入int。", - "name": "ubjson_writer_write_int", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "ubjson_writer_t*", - "name": "writer", - "desc": "writer对象。" - }, - { - "type": "int8_t", - "name": "value", - "desc": "要写入的值。" - } - ], - "annotation": {}, - "desc": "写入int8。", - "name": "ubjson_writer_write_int8", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "ubjson_writer_t*", - "name": "writer", - "desc": "writer对象。" - }, - { - "type": "uint8_t", - "name": "value", - "desc": "要写入的值。" - } - ], - "annotation": {}, - "desc": "写入uint8。", - "name": "ubjson_writer_write_uint8", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "ubjson_writer_t*", - "name": "writer", - "desc": "writer对象。" - }, - { - "type": "int16_t", - "name": "value", - "desc": "要写入的值。" - } - ], - "annotation": {}, - "desc": "写入int16。", - "name": "ubjson_writer_write_int16", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "ubjson_writer_t*", - "name": "writer", - "desc": "writer对象。" - }, - { - "type": "int32_t", - "name": "value", - "desc": "要写入的值。" - } - ], - "annotation": {}, - "desc": "写入int32。", - "name": "ubjson_writer_write_int32", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "ubjson_writer_t*", - "name": "writer", - "desc": "writer对象。" - }, - { - "type": "int64_t", - "name": "value", - "desc": "要写入的值。" - } - ], - "annotation": {}, - "desc": "写入int64。", - "name": "ubjson_writer_write_int64", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "ubjson_writer_t*", - "name": "writer", - "desc": "writer对象。" - }, - { - "type": "float", - "name": "value", - "desc": "要写入的值。" - } - ], - "annotation": {}, - "desc": "写入float。", - "name": "ubjson_writer_write_float32", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "ubjson_writer_t*", - "name": "writer", - "desc": "writer对象。" - }, - { - "type": "double", - "name": "value", - "desc": "要写入的值。" - } - ], - "annotation": {}, - "desc": "写入double。", - "name": "ubjson_writer_write_float64", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "ubjson_writer_t*", - "name": "writer", - "desc": "writer对象。" - }, - { - "type": "char", - "name": "value", - "desc": "要写入的值。" - } - ], - "annotation": {}, - "desc": "写入char。", - "name": "ubjson_writer_write_char", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "ubjson_writer_t*", - "name": "writer", - "desc": "writer对象。" - }, - { - "type": "const char*", - "name": "value", - "desc": "要写入的字符串。" - } - ], - "annotation": {}, - "desc": "写入str。", - "name": "ubjson_writer_write_str", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "ubjson_writer_t*", - "name": "writer", - "desc": "writer对象。" - }, - { - "type": "const char*", - "name": "value", - "desc": "要写入的字符串。" - }, - { - "type": "uint32_t", - "name": "len", - "desc": "字符串的长度。" - } - ], - "annotation": {}, - "desc": "写入str。", - "name": "ubjson_writer_write_str_len", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "ubjson_writer_t*", - "name": "writer", - "desc": "writer对象。" - }, { "type": "object_t*", - "name": "obj", - "desc": "要写入的对象。" + "name": "args", + "desc": "参数。" } ], - "annotation": {}, - "desc": "写入obj。", - "name": "ubjson_writer_write_object", + "annotation": { + "constructor": true + }, + "desc": "创建缺省的对话框高亮策略。", + "name": "dialog_highlighter_default_create", "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "ubjson_writer_t*", - "name": "writer", - "desc": "writer对象。" - } - ], - "annotation": {}, - "desc": "写入数组开始。\n> 即: [", - "name": "ubjson_writer_write_array_begin", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "ubjson_writer_t*", - "name": "writer", - "desc": "writer对象。" - } - ], - "annotation": {}, - "desc": "写入数组结束。\n> 即: ]", - "name": "ubjson_writer_write_array_end", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "ubjson_writer_t*", - "name": "writer", - "desc": "writer对象。" - } - ], - "annotation": {}, - "desc": "写入对象开始。\n> 即: {", - "name": "ubjson_writer_write_object_begin", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "ubjson_writer_t*", - "name": "writer", - "desc": "writer对象。" - } - ], - "annotation": {}, - "desc": "写入对象结束。\n> 即:}", - "name": "ubjson_writer_write_object_end", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "ubjson_writer_t*", - "name": "writer", - "desc": "writer对象。" - }, - { - "type": "const void*", - "name": "data", - "desc": "数据。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "数据长度。" - } - ], - "annotation": {}, - "desc": "写入二进制数据。", - "name": "ubjson_writer_write_data", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "ubjson_writer_t*", - "name": "writer", - "desc": "writer对象。" - }, - { - "type": "const char*", - "name": "key", - "desc": "键值。" - } - ], - "annotation": {}, - "desc": "写key和对象的开始。\n\n> 即:\"key\": {", - "name": "ubjson_writer_write_kv_object_begin", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "ubjson_writer_t*", - "name": "writer", - "desc": "writer对象。" - }, - { - "type": "const char*", - "name": "key", - "desc": "键名。" - }, - { - "type": "object_t*", - "name": "value", - "desc": "对象。" - } - ], - "annotation": {}, - "desc": "写key和对象。\n\n> 即:\"key\": { object }", - "name": "ubjson_writer_write_kv_object", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "ubjson_writer_t*", - "name": "writer", - "desc": "writer对象。" - }, - { - "type": "const char*", - "name": "key", - "desc": "键名。" - }, - { - "type": "int32_t", - "name": "value", - "desc": "值。" - } - ], - "annotation": {}, - "desc": "写入key和int的值。\n\n> 即:\"key\": value", - "name": "ubjson_writer_write_kv_int", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "ubjson_writer_t*", - "name": "writer", - "desc": "writer对象。" - }, - { - "type": "const char*", - "name": "key", - "desc": "键名。" - }, - { - "type": "int64_t", - "name": "value", - "desc": "值。" - } - ], - "annotation": {}, - "desc": "写入key和int64_t的值。\n\n> 即:\"key\": value", - "name": "ubjson_writer_write_kv_int64", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "ubjson_writer_t*", - "name": "writer", - "desc": "writer对象。" - }, - { - "type": "const char*", - "name": "key", - "desc": "键名。" - }, - { - "type": "float", - "name": "value", - "desc": "值。" - } - ], - "annotation": {}, - "desc": "写入key和float的值。\n\n> 即:\"key\": value", - "name": "ubjson_writer_write_kv_float", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "ubjson_writer_t*", - "name": "writer", - "desc": "writer对象。" - }, - { - "type": "const char*", - "name": "key", - "desc": "键名。" - }, - { - "type": "double", - "name": "value", - "desc": "值。" - } - ], - "annotation": {}, - "desc": "写入key和double的值。\n\n> 即:\"key\": value", - "name": "ubjson_writer_write_kv_double", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "ubjson_writer_t*", - "name": "writer", - "desc": "writer对象。" - }, - { - "type": "const char*", - "name": "key", - "desc": "键名。" - }, - { - "type": "bool_t", - "name": "value", - "desc": "值。" - } - ], - "annotation": {}, - "desc": "写入key和bool的值。\n\n> 即:\"key\": value", - "name": "ubjson_writer_write_kv_bool", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "ubjson_writer_t*", - "name": "writer", - "desc": "writer对象。" - }, - { - "type": "const char*", - "name": "key", - "desc": "键名。" - }, - { - "type": "const char*", - "name": "value", - "desc": "字符串。" - } - ], - "annotation": {}, - "desc": "写入key和str的值。\n\n> 即:\"key\": value", - "name": "ubjson_writer_write_kv_str", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "ubjson_writer_t*", - "name": "writer", - "desc": "writer对象。" - }, - { - "type": "const char*", - "name": "key", - "desc": "键名。" - }, - { - "type": "const char*", - "name": "value", - "desc": "字符串。" - }, - { - "type": "uint32_t", - "name": "len", - "desc": "字符串的长度。" - } - ], - "annotation": {}, - "desc": "写入key和str的值。\n\n> 即:\"key\": value", - "name": "ubjson_writer_write_kv_str_len", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "ubjson_writer_t*", - "name": "writer", - "desc": "writer对象。" - }, - { - "type": "const char*", - "name": "key", - "desc": "键名。" - }, - { - "type": "value_t*", - "name": "value", - "desc": "值。" - } - ], - "annotation": {}, - "desc": "写入key和value_t的值。\n\n> 即:\"key\": value", - "name": "ubjson_writer_write_kv_value", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" + "type": "dialog_highlighter_t*", + "desc": "返回对话框高亮策略对象。" } } ], "events": [], - "properties": [], - "header": "ubjson/ubjson_writer.h", - "desc": "ubjson writer", - "name": "ubjson_writer_t", - "level": 1 - }, - { - "type": "class", - "methods": [ + "properties": [ { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "uint32_t", - "name": "duration", - "desc": "动画持续时间。" - }, - { - "type": "uint32_t", - "name": "delay", - "desc": "动画执行时间。" - }, - { - "type": "easing_type_t", - "name": "easing", - "desc": "插值函数类型。" - }, - { - "type": "const char*", - "name": "prop_name", - "desc": "属性的名称。" - } - ], - "annotation": {}, - "desc": "创建单属性动画对象。", - "name": "widget_animator_prop_create", - "return": { - "type": "widget_animator_t*", - "desc": "成功返回动画对象,失败返回NULL。" - } + "name": "start_alpha", + "desc": "起始alpha,打开对话框的动画开始时的alpha值。", + "type": "uint8_t" }, { - "params": [ - { - "type": "widget_animator_t*", - "name": "animator", - "desc": "动画对象本身。" - }, - { - "type": "double", - "name": "from", - "desc": "prop起始值。" - }, - { - "type": "double", - "name": "to", - "desc": "prop结束值。" - } - ], - "annotation": {}, - "desc": "设置动画对象的参数。", - "name": "widget_animator_prop_set_params", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [], - "header": "widget_animators/widget_animator_prop.h", - "desc": "通过修改对象的指定属性形成动画效果。", - "name": "widget_animator_prop_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "uint32_t", - "name": "duration", - "desc": "动画持续时间。" - }, - { - "type": "uint32_t", - "name": "delay", - "desc": "动画执行时间。" - }, - { - "type": "easing_type_t", - "name": "easing", - "desc": "插值函数类型。" - }, - { - "type": "const char*", - "name": "prop1_name", - "desc": "属性1的名称。" - }, - { - "type": "const char*", - "name": "prop2_name", - "desc": "属性2的名称。" - } - ], - "annotation": {}, - "desc": "创建双属性动画对象。", - "name": "widget_animator_prop2_create", - "return": { - "type": "widget_animator_t*", - "desc": "成功返回动画对象,失败返回NULL。" - } + "name": "end_alpha", + "desc": "结束alpha,打开对话框的动画结束(直到对话框被关闭)时的alpha值。", + "type": "uint8_t" }, { - "params": [ - { - "type": "widget_animator_t*", - "name": "animator", - "desc": "动画对象本身。" - }, - { - "type": "double", - "name": "from1", - "desc": "x的初值。" - }, - { - "type": "double", - "name": "from2", - "desc": "y的初值。" - }, - { - "type": "double", - "name": "to1", - "desc": "x的终值。" - }, - { - "type": "double", - "name": "to2", - "desc": "y的终值。" - } - ], - "annotation": {}, - "desc": "设置动画对象的参数。", - "name": "widget_animator_prop2_set_params", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } + "name": "system_bar_alpha", + "desc": "由于在没有过度动画的情况下,截图中已经包括黑色色块,为了让 system_bar 也同步高亮部分的色块透明。", + "type": "uint8_t" } ], - "events": [], - "properties": [], - "header": "widget_animators/widget_animator_prop2.h", - "desc": "通过修改对象的两个指定属性形成动画效果。", - "name": "widget_animator_prop2_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "uint32_t", - "name": "duration", - "desc": "动画持续时间。" - }, - { - "type": "uint32_t", - "name": "delay", - "desc": "动画执行时间。" - }, - { - "type": "easing_type_t", - "name": "easing", - "desc": "插值函数类型。" - } - ], - "annotation": {}, - "desc": "创建动画对象。", - "name": "widget_animator_scroll_create", - "return": { - "type": "widget_animator_t*", - "desc": "成功返回动画对象,失败返回NULL。" - } - }, - { - "params": [ - { - "type": "widget_animator_t*", - "name": "animator", - "desc": "动画对象本身。" - }, - { - "type": "xy_t", - "name": "x_from", - "desc": "x起点值。" - }, - { - "type": "xy_t", - "name": "y_from", - "desc": "y起点值。" - }, - { - "type": "xy_t", - "name": "x_to", - "desc": "x终点值。" - }, - { - "type": "xy_t", - "name": "y_to", - "desc": "y终点值。" - } - ], - "annotation": {}, - "desc": "设置动画对象的参数。", - "name": "widget_animator_scroll_set_params", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [], - "header": "widget_animators/widget_animator_scroll.h", - "desc": "滚动控件的动画。\n本动画也可以用widget_animator_prop2实现,但滚动控件需要访问内部数据结构,出于可读性考虑保留独立实现。", - "name": "widget_animator_scroll_t", + "header": "dialog_highlighters/dialog_highlighter_default.h", + "desc": "缺省对话框高亮策略。\n\n>本策略在背景上画一层半透明的蒙版来高亮(突出)对话框本身。\n>对于性能不高的平台,建议将start\\_alpha和end\\_alpha设为相同。", + "name": "dialog_highlighter_default_t", "level": 1 }, { @@ -41012,14 +29165,197 @@ "annotation": { "global": true }, - "desc": "初始化AWTK控件。", - "name": "tk_widgets_init", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - }, + "desc": "", + "name": "SDL_ShowCursor", "type": "method", - "header": "widgets/widgets.h", + "header": "src/dllexports.h", + "level": 1 + }, + { + "params": [], + "annotation": { + "global": true + }, + "desc": "", + "name": "SDL_WarpMouseInWindow", + "type": "method", + "header": "src/dllexports.h", + "level": 1 + }, + { + "params": [], + "annotation": { + "global": true + }, + "desc": "", + "name": "SDL_GetDefaultCursor", + "type": "method", + "header": "src/dllexports.h", + "level": 1 + }, + { + "params": [], + "annotation": { + "global": true + }, + "desc": "", + "name": "SDL_SetCursor", + "type": "method", + "header": "src/dllexports.h", + "level": 1 + }, + { + "params": [], + "annotation": { + "global": true + }, + "desc": "", + "name": "SDL_FreeCursor", + "type": "method", + "header": "src/dllexports.h", + "level": 1 + }, + { + "params": [], + "annotation": { + "global": true + }, + "desc": "", + "name": "SDL_CreateSystemCursor", + "type": "method", + "header": "src/dllexports.h", + "level": 1 + }, + { + "params": [], + "annotation": { + "global": true + }, + "desc": "", + "name": "SDL_GetMouseFocus", + "type": "method", + "header": "src/dllexports.h", + "level": 1 + }, + { + "params": [], + "annotation": { + "global": true + }, + "desc": "", + "name": "SDL_MixAudioFormat", + "type": "method", + "header": "src/dllexports.h", + "level": 1 + }, + { + "params": [], + "annotation": { + "global": true + }, + "desc": "", + "name": "SDL_DequeueAudio", + "type": "method", + "header": "src/dllexports.h", + "level": 1 + }, + { + "params": [], + "annotation": { + "global": true + }, + "desc": "", + "name": "SDL_QueueAudio", + "type": "method", + "header": "src/dllexports.h", + "level": 1 + }, + { + "params": [], + "annotation": { + "global": true + }, + "desc": "", + "name": "SDL_GetQueuedAudioSize", + "type": "method", + "header": "src/dllexports.h", + "level": 1 + }, + { + "params": [], + "annotation": { + "global": true + }, + "desc": "", + "name": "SDL_ClearQueuedAudio", + "type": "method", + "header": "src/dllexports.h", + "level": 1 + }, + { + "params": [], + "annotation": { + "global": true + }, + "desc": "", + "name": "SDL_PauseAudioDevice", + "type": "method", + "header": "src/dllexports.h", + "level": 1 + }, + { + "params": [], + "annotation": { + "global": true + }, + "desc": "", + "name": "SDL_CloseAudioDevice", + "type": "method", + "header": "src/dllexports.h", + "level": 1 + }, + { + "params": [], + "annotation": { + "global": true + }, + "desc": "", + "name": "SDL_OpenAudioDevice", + "type": "method", + "header": "src/dllexports.h", + "level": 1 + }, + { + "params": [], + "annotation": { + "global": true + }, + "desc": "", + "name": "SDL_WasInit", + "type": "method", + "header": "src/dllexports.h", + "level": 1 + }, + { + "params": [], + "annotation": { + "global": true + }, + "desc": "", + "name": "SDL_Init", + "type": "method", + "header": "src/dllexports.h", + "level": 1 + }, + { + "params": [], + "annotation": { + "global": true + }, + "desc": "", + "name": "SDL_GetError", + "type": "method", + "header": "src/dllexports.h", "level": 1 }, { @@ -41028,30 +29364,2092 @@ { "params": [ { - "type": "const char**", - "name": "attrs", - "desc": "属性列表。" - }, - { - "type": "const char*", - "name": "attr", - "desc": "属性名。" + "type": "int", + "name": "port", + "desc": "端口号。" } ], - "annotation": {}, - "desc": "获取属性。", - "name": "xml_builder_get_attr", + "annotation": { + "static": true + }, + "desc": "监听指定端口,成功返回sock句柄。", + "name": "udp_listen", "return": { - "type": "const char*", - "desc": "返回属性的值。" + "type": "int", + "desc": "返回sock句柄。" + } + }, + { + "params": [ + { + "type": "const char*", + "name": "host", + "desc": "主机名或IP地址。" + }, + { + "type": "int", + "name": "port", + "desc": "端口号。" + } + ], + "annotation": { + "static": true + }, + "desc": "连接到指定服务器。", + "name": "udp_connect", + "return": { + "type": "int", + "desc": "返回sock句柄。" } } ], "events": [], "properties": [], - "header": "xml/xml_builder.h", - "desc": "xml builder interface", - "name": "xml_builder_t", + "header": "tkc/socket_helper.h", + "desc": "", + "name": "udp_t", + "annotation": { + "fake": true + }, + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "type": "int", + "name": "port", + "desc": "端口号。" + } + ], + "annotation": { + "static": true + }, + "desc": "监听指定端口,成功返回sock句柄。", + "name": "tcp_listen", + "return": { + "type": "int", + "desc": "返回sock句柄。" + } + }, + { + "params": [ + { + "type": "int", + "name": "sock", + "desc": "socket句柄。" + } + ], + "annotation": { + "static": true + }, + "desc": "监听指定端口,成功返回sock句柄。", + "name": "tcp_accept", + "return": { + "type": "int", + "desc": "返回sock句柄。" + } + }, + { + "params": [ + { + "type": "const char*", + "name": "host", + "desc": "主机名或IP地址。" + }, + { + "type": "int", + "name": "port", + "desc": "端口号。" + } + ], + "annotation": { + "static": true + }, + "desc": "连接到指定服务器。", + "name": "tcp_connect", + "return": { + "type": "int", + "desc": "返回sock句柄。" + } + } + ], + "events": [], + "properties": [], + "header": "tkc/socket_helper.h", + "desc": "", + "name": "tcp_t", + "annotation": { + "fake": true + }, + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [], + "annotation": { + "static": true + }, + "desc": "tcp/udp 平台初始化。", + "name": "socket_init", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [], + "annotation": { + "static": true + }, + "desc": "tcp/udp 平台~初始化。", + "name": "socket_deinit", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "int", + "name": "sock", + "desc": "socket句柄。" + } + ], + "annotation": { + "static": true + }, + "desc": "关闭socket句柄。", + "name": "socket_close", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "int", + "name": "sock", + "desc": "socket句柄。" + }, + { + "type": "int", + "name": "port", + "desc": "端口号。" + } + ], + "annotation": { + "static": true + }, + "desc": "绑定到指定端口。", + "name": "socket_bind", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "int", + "name": "sock", + "desc": "socket句柄。" + }, + { + "type": "uint32_t", + "name": "timeout_ms", + "desc": "等待时间(ms)。" + } + ], + "annotation": { + "static": true + }, + "desc": "等待数据。", + "name": "socket_wait_for_data", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "int", + "name": "sock", + "desc": "socket句柄。" + }, + { + "type": "bool_t", + "name": "blocking", + "desc": "是否阻塞。" + } + ], + "annotation": { + "static": true + }, + "desc": "设置为阻塞或非阻塞模式。", + "name": "socket_set_blocking", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "int", + "name": "sock", + "desc": "socket句柄。" + }, + { + "type": "bool_t", + "name": "", + "desc": "g" + }, + { + "type": "struct sockaddr_in*", + "name": "addr", + "desc": "地址对象。" + } + ], + "annotation": { + "static": true + }, + "desc": "解析主机名,并初始化addr对象。", + "name": "socket_resolve", + "return": { + "type": "struct sockaddr*", + "desc": "返回地址对象。" + } + } + ], + "events": [], + "properties": [], + "header": "tkc/socket_helper.h", + "desc": "", + "name": "socket", + "annotation": { + "fake": true + }, + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "type": "tk_destroy_t", + "name": "destroy", + "desc": "元素销毁函数。" + }, + { + "type": "tk_compare_t", + "name": "compare", + "desc": "元素比较函数。" + } + ], + "annotation": { + "constructor": true + }, + "desc": "创建slist对象", + "name": "slist_create", + "return": { + "type": "slist_t*", + "desc": "单向链表对象。" + } + }, + { + "params": [ + { + "type": "slist_t*", + "name": "slist", + "desc": "单向链表对象。" + }, + { + "type": "tk_destroy_t", + "name": "destroy", + "desc": "元素销毁函数。" + }, + { + "type": "tk_compare_t", + "name": "compare", + "desc": "元素比较函数。" + } + ], + "annotation": {}, + "desc": "初始化slist对象", + "name": "slist_init", + "return": { + "type": "slist_t*", + "desc": "单向链表对象。" + } + }, + { + "params": [ + { + "type": "slist_t*", + "name": "slist", + "desc": "单向链表对象。" + }, + { + "type": "void*", + "name": "ctx", + "desc": "比较函数的上下文。" + } + ], + "annotation": {}, + "desc": "查找第一个满足条件的元素。", + "name": "slist_find", + "return": { + "type": "void*", + "desc": "如果找到,返回满足条件的对象,否则返回NULL。" + } + }, + { + "params": [ + { + "type": "slist_t*", + "name": "slist", + "desc": "单向链表对象。" + }, + { + "type": "void*", + "name": "ctx", + "desc": "比较函数的上下文。" + } + ], + "annotation": {}, + "desc": "删除第一个满足条件的元素。", + "name": "slist_remove", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "slist_t*", + "name": "slist", + "desc": "单向链表对象。" + } + ], + "annotation": {}, + "desc": "删除全部元素。", + "name": "slist_remove_all", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "slist_t*", + "name": "slist", + "desc": "单向链表对象。" + }, + { + "type": "void*", + "name": "data", + "desc": "待追加的元素。" + } + ], + "annotation": {}, + "desc": "在尾巴追加一个元素。", + "name": "slist_append", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "slist_t*", + "name": "slist", + "desc": "单向链表对象。" + }, + { + "type": "void*", + "name": "data", + "desc": "待追加的元素。" + } + ], + "annotation": {}, + "desc": "在头部追加一个元素。", + "name": "slist_prepend", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "slist_t*", + "name": "slist", + "desc": "单向链表对象。" + }, + { + "type": "tk_visit_t", + "name": "visit", + "desc": "遍历函数。" + }, + { + "type": "void*", + "name": "ctx", + "desc": "遍历函数的上下文。" + } + ], + "annotation": {}, + "desc": "遍历元素。", + "name": "slist_foreach", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "slist_t*", + "name": "slist", + "desc": "单向链表对象。" + } + ], + "annotation": {}, + "desc": "弹出最后一个元素。", + "name": "slist_tail_pop", + "return": { + "type": "ret_t", + "desc": "成功返回最后一个元素,失败返回NULL。" + } + }, + { + "params": [ + { + "type": "slist_t*", + "name": "slist", + "desc": "单向链表对象。" + } + ], + "annotation": {}, + "desc": "弹出第一个元素。", + "name": "slist_head_pop", + "return": { + "type": "ret_t", + "desc": "成功返回最后一个元素,失败返回NULL。" + } + }, + { + "params": [ + { + "type": "slist_t*", + "name": "slist", + "desc": "单向链表对象。" + } + ], + "annotation": {}, + "desc": "返回元素个数。", + "name": "slist_size", + "return": { + "type": "int32_t", + "desc": "返回元素个数。" + } + }, + { + "params": [ + { + "type": "slist_t*", + "name": "slist", + "desc": "单向链表对象。" + }, + { + "type": "void*", + "name": "ctx", + "desc": "比较函数的上下文。" + } + ], + "annotation": {}, + "desc": "返回满足条件元素的个数。", + "name": "slist_count", + "return": { + "type": "int32_t", + "desc": "返回元素个数。" + } + }, + { + "params": [ + { + "type": "slist_t*", + "name": "slist", + "desc": "单向链表对象。" + } + ], + "annotation": {}, + "desc": "清除单向链表中的元素。", + "name": "slist_deinit", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "slist_t*", + "name": "slist", + "desc": "单向链表对象。" + } + ], + "annotation": {}, + "desc": "清除单向链表中的元素,并释放单向链表对象。", + "name": "slist_destroy", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + } + ], + "events": [], + "properties": [ + { + "name": "first", + "desc": "首节点。", + "type": "slist_node_t*", + "annotation": { + "readable": true + } + }, + { + "name": "destroy", + "desc": "元素销毁函数。", + "type": "tk_destroy_t", + "annotation": { + "readable": true + } + }, + { + "name": "compare", + "desc": "元素比较函数。", + "type": "tk_compare_t", + "annotation": { + "readable": true + } + } + ], + "header": "tkc/slist.h", + "desc": "单向链表\n\n用slist\\_init初始化时,用slist\\_deinit释放。如:\n\n```c\nslist_t slist;\nslist_init(&slist, destroy, compare);\n...\nslist_deinit(&slist);\n```\n\n用slist\\_create创建时,用slist\\_destroy销毁。如:\n\n```c\nslist_t* slist = slist_create(destroy, compare);\n...\nslist_destroy(slist);\n```", + "name": "slist_t", + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [], + "annotation": { + "static": true + }, + "desc": "初始化AWTK扩展控件。", + "name": "tk_ext_widgets_init", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + } + ], + "events": [], + "properties": [], + "header": "ext_widgets/ext_widgets.h", + "desc": "", + "name": "tk_ext_widgets_t", + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "type": "uint32_t", + "name": "value", + "desc": "初始值。" + }, + { + "type": "const char*", + "name": "name", + "desc": "名称。" + } + ], + "annotation": {}, + "desc": "创建信号量对象。", + "name": "tk_semaphore_create", + "return": { + "type": "tk_semaphore_t*", + "desc": "semaphore对象。" + } + }, + { + "params": [ + { + "type": "tk_semaphore_t*", + "name": "semaphore", + "desc": "信号量对象。" + }, + { + "type": "uint32_t", + "name": "timeout_ms", + "desc": "超时时间。" + } + ], + "annotation": {}, + "desc": "获取资源。", + "name": "tk_semaphore_wait", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "tk_semaphore_t*", + "name": "semaphore", + "desc": "信号量对象。" + } + ], + "annotation": {}, + "desc": "释放资源。", + "name": "tk_semaphore_post", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "tk_semaphore_t*", + "name": "semaphore", + "desc": "信号量对象。" + } + ], + "annotation": {}, + "desc": "销毁信号量对象。", + "name": "tk_semaphore_destroy", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + } + ], + "events": [], + "properties": [], + "header": "tkc/semaphore.h", + "desc": "信号量。", + "name": "tk_semaphore_t", + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "type": "const char*", + "name": "name", + "desc": "文件名。" + }, + { + "type": "const char*", + "name": "mode", + "desc": "打开方式。" + } + ], + "annotation": {}, + "desc": "打开文件。", + "name": "rom_fopen", + "return": { + "type": "ret_t", + "desc": "返回不是NULL表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "const uint8_t*", + "name": "data", + "desc": "数据。" + }, + { + "type": "uint32_t", + "name": "capacity", + "desc": "容量。" + } + ], + "annotation": {}, + "desc": "打开文件。", + "name": "rom_fopen_buff", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "rom_file_t*", + "name": "f", + "desc": "rom_file_t对象。" + } + ], + "annotation": {}, + "desc": "返回文件当前位置。", + "name": "rom_ftell", + "return": { + "type": "long", + "desc": "返回当前位置。" + } + }, + { + "params": [ + { + "type": "rom_file_t*", + "name": "f", + "desc": "rom_file_t对象。" + } + ], + "annotation": {}, + "desc": "判断是否到文件末尾。", + "name": "rom_feof", + "return": { + "type": "int", + "desc": "返回当前位置。" + } + }, + { + "params": [ + { + "type": "rom_file_t*", + "name": "f", + "desc": "rom_file_t对象。" + }, + { + "type": "long", + "name": "offset", + "desc": "偏移量。" + }, + { + "type": "int", + "name": "whence", + "desc": "要从哪个位置开始偏移, SEEK_SET表示从头开始,SEEK_CUR表示从当前位置开始,SEEK_END表示从文件末尾开始。" + } + ], + "annotation": {}, + "desc": "设置文件当前位置。", + "name": "rom_fseek", + "return": { + "type": "int", + "desc": "返回0表示成功。" + } + }, + { + "params": [ + { + "type": "void*", + "name": "ptr", + "desc": "数据的缓冲区。" + }, + { + "type": "size_t", + "name": "size", + "desc": "缓冲区大小。" + }, + { + "type": "size_t", + "name": "nitems", + "desc": "元素的个数。" + }, + { + "type": "rom_file_t*", + "name": "f", + "desc": "rom_file_t对象。" + } + ], + "annotation": {}, + "desc": "读取文件。", + "name": "rom_fread", + "return": { + "type": "size_t", + "desc": "返回实际读取的字节数。" + } + }, + { + "params": [ + { + "type": "void*", + "name": "ptr", + "desc": "数据的缓冲区。" + }, + { + "type": "size_t", + "name": "size", + "desc": "缓冲区大小。" + }, + { + "type": "size_t", + "name": "nitems", + "desc": "元素的个数。" + }, + { + "type": "rom_file_t*", + "name": "f", + "desc": "rom_file_t对象。" + } + ], + "annotation": {}, + "desc": "写文件。\n> 本函数什么也不做。", + "name": "rom_fwrite", + "return": { + "type": "size_t", + "desc": "返回实际写的字节数。" + } + }, + { + "params": [ + { + "type": "rom_file_t*", + "name": "f", + "desc": "rom_file_t对象。" + } + ], + "annotation": {}, + "desc": "关闭文件。", + "name": "rom_fclose", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + } + ], + "events": [], + "properties": [], + "header": "tkc/rom_fs.h", + "desc": "rom_file接口。\n\n> 主要用于给google pinyin输入提供兼容的文件系统API。\n\n示例:\n\n```c\nchar rbuff[100];\nsize_t len = 0;\nconst char* buff = \"hello world\";\nrom_file_t* f = rom_fopen_buff((const uint8_t*)buff, sizeof(buff));\nlen = rom_fread(rbuff, 2, 1, f);\nrom_fclose(f);\n```", + "name": "rom_t", + "annotation": { + "fake": true + }, + "level": 1 + }, + { + "type": "class", + "methods": [], + "events": [], + "properties": [ + { + "name": "name", + "desc": "名称。", + "type": "char*", + "annotation": { + "readable": true + } + }, + { + "name": "is_dir", + "desc": "是否是目录。", + "type": "bool_t", + "annotation": { + "readable": true + } + }, + { + "name": "is_reg_file", + "desc": "是否是常规文件。", + "type": "bool_t", + "annotation": { + "readable": true + } + }, + { + "name": "size", + "desc": "文件大小。", + "type": "uint64_t", + "annotation": { + "readable": true + } + }, + { + "name": "atime", + "desc": "最后一次访问时间。", + "type": "uint64_t", + "annotation": { + "readable": true + } + }, + { + "name": "mtime", + "desc": "最后修改时间。", + "type": "uint64_t", + "annotation": { + "readable": true + } + }, + { + "name": "ctime", + "desc": "创建时间。", + "type": "uint64_t", + "annotation": { + "readable": true + } + } + ], + "header": "file_browser/file_browser.h", + "desc": "文件或目录的信息。", + "name": "fb_item_t", + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [], + "annotation": { + "constructor": true + }, + "desc": "创建file_browser对象", + "name": "file_browser_create", + "return": { + "type": "file_browser_t*", + "desc": "对象。" + } + }, + { + "params": [ + { + "type": "file_browser_t*", + "name": "fb", + "desc": "file browser对象。" + }, + { + "type": "const char*", + "name": "cwd", + "desc": "当前目录。" + } + ], + "annotation": {}, + "desc": "设置当前目录。", + "name": "file_browser_set_cwd", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "file_browser_t*", + "name": "fb", + "desc": "file browser对象。" + }, + { + "type": "const char*", + "name": "name", + "desc": "当前目录下的子目录名。" + } + ], + "annotation": {}, + "desc": "在当前目录下创建指定子目录。", + "name": "file_browser_create_dir", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "file_browser_t*", + "name": "fb", + "desc": "file browser对象。" + }, + { + "type": "const char*", + "name": "name", + "desc": "当前目录下的文件名。" + }, + { + "type": "const void*", + "name": "buff", + "desc": "文件内容。" + }, + { + "type": "uint32_t", + "name": "size", + "desc": "文件内容的长度。" + } + ], + "annotation": {}, + "desc": "在当前目录下创建指定文件。", + "name": "file_browser_create_file", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "file_browser_t*", + "name": "fb", + "desc": "file browser对象。" + }, + { + "type": "const char*", + "name": "name", + "desc": "当前目录下的子目录名/文件名。" + } + ], + "annotation": {}, + "desc": "删除当前目录下的指定子目录或文件。", + "name": "file_browser_remove", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "file_browser_t*", + "name": "fb", + "desc": "file browser对象。" + }, + { + "type": "const char*", + "name": "dir", + "desc": "当前目录下的子目录名。" + } + ], + "annotation": {}, + "desc": "进入当前目录下的指定子目录。", + "name": "file_browser_enter", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "file_browser_t*", + "name": "fb", + "desc": "file browser对象。" + } + ], + "annotation": {}, + "desc": "返回上一级目录。", + "name": "file_browser_up", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "file_browser_t*", + "name": "fb", + "desc": "file browser对象。" + } + ], + "annotation": {}, + "desc": "刷新。", + "name": "file_browser_refresh", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "file_browser_t*", + "name": "fb", + "desc": "file browser对象。" + }, + { + "type": "tk_filter_t", + "name": "filter", + "desc": "过滤函数。" + }, + { + "type": "void*", + "name": "ctx", + "desc": "过滤函数的上下文。" + } + ], + "annotation": {}, + "desc": "设置过滤函数。", + "name": "file_browser_set_filter", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "file_browser_t*", + "name": "fb", + "desc": "file browser对象。" + }, + { + "type": "tk_compare_t", + "name": "compare", + "desc": "排序用的比较函数。" + } + ], + "annotation": {}, + "desc": "设置排序用的比较函数。", + "name": "file_browser_set_compare", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "file_browser_t*", + "name": "fb", + "desc": "file browser对象。" + }, + { + "type": "bool_t", + "name": "ascending", + "desc": "按升序排。" + } + ], + "annotation": {}, + "desc": "按名称排序。", + "name": "file_browser_sort_by_name", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "file_browser_t*", + "name": "fb", + "desc": "file browser对象。" + }, + { + "type": "bool_t", + "name": "ascending", + "desc": "按升序排。" + } + ], + "annotation": {}, + "desc": "按类型排序。", + "name": "file_browser_sort_by_type", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "file_browser_t*", + "name": "fb", + "desc": "file browser对象。" + }, + { + "type": "bool_t", + "name": "ascending", + "desc": "按升序排。" + } + ], + "annotation": {}, + "desc": "按大小排序。", + "name": "file_browser_sort_by_size", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "file_browser_t*", + "name": "fb", + "desc": "file browser对象。" + }, + { + "type": "bool_t", + "name": "ascending", + "desc": "按升序排。" + } + ], + "annotation": {}, + "desc": "按修改时间排序。", + "name": "file_browser_sort_by_mtime", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "file_browser_t*", + "name": "fb", + "desc": "file browser对象。" + } + ], + "annotation": {}, + "desc": "获取当前目录下文件项个数。", + "name": "file_browser_get_items_nr", + "return": { + "type": "uint32_t", + "desc": "返回当前目录下文件项个数。" + } + }, + { + "params": [ + { + "type": "file_browser_t*", + "name": "fb", + "desc": "file browser对象。" + }, + { + "type": "uint32_t", + "name": "index", + "desc": "序数。" + } + ], + "annotation": {}, + "desc": "获取指定项序数的项目。", + "name": "file_browser_get_item", + "return": { + "type": "fb_item_t*", + "desc": "返回指定项序数的项目。" + } + }, + { + "params": [ + { + "type": "file_browser_t*", + "name": "fb", + "desc": "file browser对象。" + }, + { + "type": "bool_t", + "name": "ignore_hidden_files", + "desc": "是否忽略隐藏文件。" + } + ], + "annotation": {}, + "desc": "设置是否忽略隐藏文件。", + "name": "file_browser_set_ignore_hidden_files", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "file_browser_t*", + "name": "fb", + "desc": "file browser对象。" + } + ], + "annotation": {}, + "desc": "销毁file_browser对象", + "name": "file_browser_destroy", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + } + ], + "events": [], + "properties": [ + { + "name": "cwd", + "desc": "当前路径。", + "type": "char*", + "annotation": { + "readable": true + } + } + ], + "header": "file_browser/file_browser.h", + "desc": "文件浏览器模型。", + "name": "file_browser_t", + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "type": "const char*", + "name": "filename_pattern", + "desc": "用来确定文件名的路径和文件名。" + }, + { + "type": "uint32_t", + "name": "max_size", + "desc": "log文件占用最大磁盘空间(字节)。" + }, + { + "type": "uint32_t", + "name": "buff_size", + "desc": "用于指定print时的buff大小。" + } + ], + "annotation": { + "scriptable": true, + "constructor": true + }, + "desc": "创建rlog对象。\n\n```c\nrlog_t* log = rlog_create(\"./logs/%d.log\", 1020*1024, 256);\nrlog_write(log, \"hello\\n\");\nrlog_destroy(log);\n```", + "name": "rlog_create", + "return": { + "type": "rlog_t*", + "desc": "返回rlog对象。" + } + }, + { + "params": [ + { + "type": "rlog_t*", + "name": "log", + "desc": "日志对象。" + }, + { + "type": "const char*", + "name": "str", + "desc": "日志字符串。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "写入一条日志记录。", + "name": "rlog_write", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "rlog_t*", + "name": "log", + "desc": "日志对象。" + }, + { + "type": "const char*", + "name": "format", + "desc": "格式字符串。" + } + ], + "annotation": {}, + "desc": "写入一条日志记录。", + "name": "rlog_print", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "rlog_t*", + "name": "log", + "desc": "日志对象。" + } + ], + "annotation": {}, + "desc": "销毁日志对象。", + "name": "rlog_destroy", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + } + ], + "events": [], + "properties": [], + "header": "tkc/rlog.h", + "desc": "循环记录日志(支持多线程访问)。\n如果我们把日志写入文件中,随着时间的推移,日志文件会越来越大,最终占满这个磁盘,出现不可预料的错误。\nrlog提供一个循环记录日志的功能,让日志文件始终不会超出指定的大小,达到指定大小后再从头开始写。\n\n> 为了实现简单,我们把日志文件分成0和1两个文件,先写文件0,到达指定最大值的一半时,再写文件1。\n> 文件1到达指定最大值的一半时,删除文件0,并将文件1改名为文件0,重新创建文件1,继续写文件1,重复此过程。", + "name": "rlog_t", + "annotation": { + "scriptable": true + }, + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "type": "uint32_t", + "name": "init_capacity", + "desc": "初始容量。" + }, + { + "type": "uint32_t", + "name": "max_capacity", + "desc": "最大容量。" + } + ], + "annotation": { + "constructor": true + }, + "desc": "创建ring_buffer对象。", + "name": "ring_buffer_create", + "return": { + "type": "ring_buffer_t*", + "desc": "ring_buffer对象。" + } + }, + { + "params": [ + { + "type": "ring_buffer_t*", + "name": "ring_buffer", + "desc": "ring_buffer对象。" + } + ], + "annotation": {}, + "desc": "检查ring_buffer是否满。", + "name": "ring_buffer_is_full", + "return": { + "type": "bool_t", + "desc": "是否满。" + } + }, + { + "params": [ + { + "type": "ring_buffer_t*", + "name": "ring_buffer", + "desc": "ring_buffer对象。" + } + ], + "annotation": {}, + "desc": "检查ring_buffer是否空。", + "name": "ring_buffer_is_empty", + "return": { + "type": "bool_t", + "desc": "是否空。" + } + }, + { + "params": [ + { + "type": "ring_buffer_t*", + "name": "ring_buffer", + "desc": "ring_buffer对象。" + } + ], + "annotation": {}, + "desc": "获取数据长度。", + "name": "ring_buffer_size", + "return": { + "type": "uint32_t", + "desc": "数据长度。" + } + }, + { + "params": [ + { + "type": "ring_buffer_t*", + "name": "ring_buffer", + "desc": "ring_buffer对象。" + } + ], + "annotation": {}, + "desc": "获取空闲空间的长度。", + "name": "ring_buffer_free_size", + "return": { + "type": "uint32_t", + "desc": "空闲空间的长度。" + } + }, + { + "params": [ + { + "type": "ring_buffer_t*", + "name": "ring_buffer", + "desc": "ring_buffer对象。" + } + ], + "annotation": {}, + "desc": "获取容量。", + "name": "ring_buffer_capacity", + "return": { + "type": "uint32_t", + "desc": "容量。" + } + }, + { + "params": [ + { + "type": "ring_buffer_t*", + "name": "ring_buffer", + "desc": "ring_buffer对象。" + }, + { + "type": "void*", + "name": "buff", + "desc": "缓冲区。" + }, + { + "type": "uint32_t", + "name": "size", + "desc": "最大长度。" + } + ], + "annotation": {}, + "desc": "读取数据。", + "name": "ring_buffer_read", + "return": { + "type": "uint32_t", + "desc": "返回实际读取数据的长度。" + } + }, + { + "params": [ + { + "type": "ring_buffer_t*", + "name": "ring_buffer", + "desc": "ring_buffer对象。" + }, + { + "type": "void*", + "name": "buff", + "desc": "缓冲区。" + }, + { + "type": "uint32_t", + "name": "size", + "desc": "最大长度。" + } + ], + "annotation": {}, + "desc": "读取数据(不修改读取位置)。", + "name": "ring_buffer_peek", + "return": { + "type": "uint32_t", + "desc": "返回实际读取数据的长度。" + } + }, + { + "params": [ + { + "type": "ring_buffer_t*", + "name": "ring_buffer", + "desc": "ring_buffer对象。" + }, + { + "type": "const void*", + "name": "buff", + "desc": "缓冲区。" + }, + { + "type": "uint32_t", + "name": "size", + "desc": "最大长度。" + } + ], + "annotation": {}, + "desc": "写入数据。", + "name": "ring_buffer_write", + "return": { + "type": "uint32_t", + "desc": "返回实际写入数据的长度。" + } + }, + { + "params": [ + { + "type": "ring_buffer_t*", + "name": "ring_buffer", + "desc": "ring_buffer对象。" + }, + { + "type": "void*", + "name": "buff", + "desc": "缓冲区。" + }, + { + "type": "uint32_t", + "name": "size", + "desc": "最大长度。" + } + ], + "annotation": {}, + "desc": "读取指定长度数据,要么成功要么失败。", + "name": "ring_buffer_read_len", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "ring_buffer_t*", + "name": "ring_buffer", + "desc": "ring_buffer对象。" + }, + { + "type": "uint32_t", + "name": "size", + "desc": "长度。" + } + ], + "annotation": {}, + "desc": "跳过指定长度数据,要么成功要么失败。", + "name": "ring_buffer_skip", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "ring_buffer_t*", + "name": "ring_buffer", + "desc": "ring_buffer对象。" + }, + { + "type": "const void*", + "name": "buff", + "desc": "缓冲区。" + }, + { + "type": "uint32_t", + "name": "size", + "desc": "最大长度。" + } + ], + "annotation": {}, + "desc": "写入指定长度数据,要么成功要么失败。", + "name": "ring_buffer_write_len", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "ring_buffer_t*", + "name": "ring_buffer", + "desc": "ring_buffer对象。" + } + ], + "annotation": {}, + "desc": "重置ring_buffer为空。", + "name": "ring_buffer_reset", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "ring_buffer_t*", + "name": "ring_buffer", + "desc": "ring_buffer对象。" + }, + { + "type": "uint32_t", + "name": "r", + "desc": "读取光标的位置。" + } + ], + "annotation": {}, + "desc": "设置读取光标的位置。", + "name": "ring_buffer_set_read_cursor", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "ring_buffer_t*", + "name": "ring_buffer", + "desc": "ring_buffer对象。" + }, + { + "type": "uint32_t", + "name": "r_delta", + "desc": "读取光标的位置(delta)。" + } + ], + "annotation": {}, + "desc": "设置读取光标的位置(delta)。", + "name": "ring_buffer_set_read_cursor_delta", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "ring_buffer_t*", + "name": "ring_buffer", + "desc": "ring_buffer对象。" + }, + { + "type": "uint32_t", + "name": "w", + "desc": "写入光标的位置。" + } + ], + "annotation": {}, + "desc": "设置写入光标的位置。", + "name": "ring_buffer_set_write_cursor", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "ring_buffer_t*", + "name": "ring_buffer", + "desc": "ring_buffer对象。" + }, + { + "type": "uint32_t", + "name": "w_delta", + "desc": "写入光标的位置(delta)。" + } + ], + "annotation": {}, + "desc": "设置写入光标的位置(delta)。", + "name": "ring_buffer_set_write_cursor_delta", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "ring_buffer_t*", + "name": "ring_buffer", + "desc": "ring_buffer对象。" + }, + { + "type": "uint32_t", + "name": "size", + "desc": "需要的大小。" + } + ], + "annotation": {}, + "desc": "扩展buffer。", + "name": "ring_buffer_ensure_write_space", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "ring_buffer_t*", + "name": "ring_buffer", + "desc": "ring_buffer对象。" + } + ], + "annotation": {}, + "desc": "销毁ring_buffer。", + "name": "ring_buffer_destroy", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + } + ], + "events": [], + "properties": [ + { + "name": "r", + "desc": "读取位置。", + "type": "uint32_t", + "annotation": { + "readable": true + } + }, + { + "name": "w", + "desc": "写入位置。", + "type": "uint32_t", + "annotation": { + "readable": true + } + }, + { + "name": "full", + "desc": "是否满。", + "type": "bool_t", + "annotation": { + "readable": true + } + }, + { + "name": "capacity", + "desc": "当前容量。", + "type": "uint32_t", + "annotation": { + "readable": true + } + }, + { + "name": "max_capacity", + "desc": "最大容量。", + "type": "uint32_t", + "annotation": { + "readable": true + } + }, + { + "name": "data", + "desc": "数据。", + "type": "uint8_t*", + "annotation": { + "readable": true + } + } + ], + "header": "tkc/ring_buffer.h", + "desc": "循环缓存区。", + "name": "ring_buffer_t", + "level": 1 + }, + { + "type": "enum", + "desc": "bidi 类型常量定义。", + "consts": [ + { + "desc": "自动检查。", + "name": "BIDI_TYPE_AUTO" + }, + { + "desc": "Left-To-Right letter。", + "name": "BIDI_TYPE_LTR" + }, + { + "desc": "Right-To-Left letter。", + "name": "BIDI_TYPE_RTL" + }, + { + "desc": "Left-To-Right letter Override。", + "name": "BIDI_TYPE_LRO" + }, + { + "desc": "Right-To-Left letter Override。", + "name": "BIDI_TYPE_RLO" + }, + { + "desc": "Weak Left To Right paragraph。", + "name": "BIDI_TYPE_WLTR" + }, + { + "desc": "Weak Right To Left paragraph。", + "name": "BIDI_TYPE_WRTL" + } + ], + "header": "base/bidi.h", + "name": "bidi_type_t", + "prefix": "BIDI_TYPE_", + "annotation": { + "scriptable": true + }, + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "type": "bidi_t*", + "name": "bidi", + "desc": "bidi对象。" + }, + { + "type": "bool_t", + "name": "alloc_l2v", + "desc": "是否为positions_L_to_V分配空间。" + }, + { + "type": "bool_t", + "name": "alloc_v2l", + "desc": "是否为positions_V_to_L分配空间。" + }, + { + "type": "bidi_type_t", + "name": "type", + "desc": "类型。" + } + ], + "annotation": { + "deconstructor": true + }, + "desc": "初始化bidi对象。", + "name": "bidi_init", + "return": { + "type": "bidi_t*", + "desc": "返回bidi对象。" + } + }, + { + "params": [ + { + "type": "const char*", + "name": "name", + "desc": "类型名称(取值:rtl,ltr,auto,wrtl,wltr,lro,rlo)。" + } + ], + "annotation": { + "static": true + }, + "desc": "将bidi类型的名称转换成类型。", + "name": "bidi_type_from_name", + "return": { + "type": "bidi_t*", + "desc": "返回bidi对象。" + } + }, + { + "params": [ + { + "type": "bidi_t*", + "name": "bidi", + "desc": "bidi对象。" + }, + { + "type": "const wchar_t*", + "name": "str", + "desc": "字符串。" + }, + { + "type": "uint32_t", + "name": "size", + "desc": "字符串的长度。" + } + ], + "annotation": {}, + "desc": "将字符串转成用于显示的字符串,输出结果放在bidi->vis_str中。", + "name": "bidi_log2vis", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "bidi_t*", + "name": "bidi", + "desc": "bidi对象。" + } + ], + "annotation": { + "deconstructor": true + }, + "desc": "释放bidi对象相关资源。", + "name": "bidi_deinit", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + } + ], + "events": [], + "properties": [ + { + "name": "vis_strx", + "desc": "用于显示的字符串(存放log2vis的结果)。", + "type": "wchar_t*", + "annotation": { + "readable": true + } + }, + { + "name": "vis_str_size", + "desc": "用于显示的字符串长度(存放log2vis的结果)。", + "type": "uint32_t", + "annotation": { + "readable": true + } + }, + { + "name": "request_type", + "desc": "请求的类型。", + "type": "bidi_type_t", + "annotation": { + "readable": true + } + }, + { + "name": "resolved_type", + "desc": "实际的类型。", + "type": "bidi_type_t", + "annotation": { + "readable": true + } + }, + { + "name": "positions_L_to_V", + "desc": "logical位置与visual位置的映射。", + "type": "int32_t*", + "annotation": { + "readable": true + } + }, + { + "name": "positions_V_to_L", + "desc": "visual位置与logical位置的映射。", + "type": "int32_t*", + "annotation": { + "readable": true + } + } + ], + "header": "base/bidi.h", + "desc": "Unicode Bidirectional Algorithm.", + "name": "bidi_t", "level": 1 }, { @@ -41180,239 +31578,348 @@ "name": "XmlParser", "level": 1 }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "type": "qaction_exec_t", + "name": "exec", + "desc": "执行函数。" + }, + { + "type": "void*", + "name": "args", + "desc": "参数。" + }, + { + "type": "uint32_t", + "name": "args_size", + "desc": "参数长度。" + } + ], + "annotation": {}, + "desc": "创建action对象。", + "name": "qaction_create", + "return": { + "type": "qaction_t*", + "desc": "返回action对象。" + } + }, + { + "params": [ + { + "type": "qaction_t*", + "name": "action", + "desc": "action对象。" + }, + { + "type": "qaction_on_event_t", + "name": "on_event", + "desc": "事件处理函数。" + } + ], + "annotation": {}, + "desc": "设置事件处理函数(回调函数在后台线程执行)。\n\n> exec执行完成后,会触发EVT\\_DONE事件,一般在EVT\\_DONE事件中调用qaction\\_destroy函数销毁action。", + "name": "qaction_set_on_event", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "qaction_t*", + "name": "action", + "desc": "action对象。" + } + ], + "annotation": {}, + "desc": "执行。", + "name": "qaction_exec", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "qaction_t*", + "name": "action", + "desc": "action对象。" + }, + { + "type": "event_t**", + "name": "event", + "desc": "event对象。" + } + ], + "annotation": {}, + "desc": "事件通知。", + "name": "qaction_notify", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "qaction_t*", + "name": "q", + "desc": "qaction对象。" + } + ], + "annotation": {}, + "desc": "销毁。", + "name": "qaction_destroy", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + } + ], + "events": [], + "properties": [ + { + "name": "exec", + "desc": "执行函数。", + "type": "qaction_exec_t", + "annotation": { + "readable": true + } + }, + { + "name": "on_event", + "desc": "事件处理函数。如进度、错误和完成等。", + "type": "qaction_on_event_t", + "annotation": { + "readable": true + } + }, + { + "name": "args", + "desc": "exec的参数(视具体的action而不同)。", + "type": "uint32_t*", + "annotation": { + "readable": true + } + } + ], + "header": "tkc/qaction.h", + "desc": "代表一个action,放在action queue中。", + "name": "qaction_t", + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "type": "const char*", + "name": "path", + "desc": "插件所在的目录。" + }, + { + "type": "plugin_get_init_func_name_t", + "name": "get_init", + "desc": "获取初始化函数的函数名。为NULL时使用\"init\"。" + }, + { + "type": "plugin_get_deinit_func_name_t", + "name": "get_deinit", + "desc": "获取~初始化函数的函数名。为NULL时使用\"deinit\"。" + } + ], + "annotation": {}, + "desc": "创建插件管理器。", + "name": "plugin_manager_create", + "return": { + "type": "plugin_manager_t*", + "desc": "动态链接库对象。" + } + }, + { + "params": [ + { + "type": "plugin_manager_t*", + "name": "plugin_manager", + "desc": "plugin_manager对象。" + } + ], + "annotation": {}, + "desc": "重新扫描目录中的插件,加载没有加载的插件。", + "name": "plugin_manager_refresh", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "plugin_manager_t*", + "name": "plugin_manager", + "desc": "plugin_manager对象。" + } + ], + "annotation": {}, + "desc": "卸载所有插件并重新加载。", + "name": "plugin_manager_reload", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "plugin_manager_t*", + "name": "plugin_manager", + "desc": "plugin_manager对象。" + } + ], + "annotation": {}, + "desc": "显示所有的插件。", + "name": "plugin_manager_dump", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "plugin_manager_t*", + "name": "plugin_manager", + "desc": "plugin_manager对象。" + }, + { + "type": "const char*", + "name": "lib_name", + "desc": "动态库的名称。" + } + ], + "annotation": {}, + "desc": "检查指定的插件是否存在。", + "name": "plugin_manager_exist", + "return": { + "type": "bool_t", + "desc": "返回TRUE表示存在,否则表示不存在。" + } + }, + { + "params": [ + { + "type": "plugin_manager_t*", + "name": "plugin_manager", + "desc": "plugin_manager对象。" + } + ], + "annotation": {}, + "desc": "卸载全部插件,并销毁插件管理器对象。", + "name": "plugin_manager_destroy", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + } + ], + "events": [], + "properties": [], + "header": "tkc/plugin_manager.h", + "desc": "插件管理器。", + "name": "plugin_manager_t", + "level": 1 + }, { "type": "class", "methods": [ { "params": [], - "annotation": { - "constructor": true, - "scriptable": true - }, - "desc": "获取缺省资源管理器。", - "name": "assets_manager", - "alias": "assets_manager_instance", + "annotation": {}, + "desc": "获取当前时间(毫秒)。", + "name": "get_time_ms64", "return": { - "type": "assets_manager_t*", - "desc": "返回asset manager对象。" + "type": "uint64_t", + "desc": "成功返回当前时间。" } }, { - "params": [ - { - "type": "assets_manager_t*", - "name": "am", - "desc": "asset manager对象。" - } - ], + "params": [], "annotation": {}, - "desc": "设置缺省资源管理器。", - "name": "assets_manager_set", + "desc": "获取当前时间(微秒)。", + "name": "get_time_us64", "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" + "type": "uint64_t", + "desc": "成功返回当前时间。" } }, { "params": [ { "type": "uint32_t", - "name": "init_nr", - "desc": "预先分配资源的个数。" - } - ], - "annotation": { - "constructor": true - }, - "desc": "创建资源管理器。", - "name": "assets_manager_create", - "return": { - "type": "assets_manager_t*", - "desc": "返回asset manager对象。" - } - }, - { - "params": [ - { - "type": "assets_manager_t*", - "name": "am", - "desc": "asset manager对象。" - }, - { - "type": "uint32_t", - "name": "init_nr", - "desc": "预先分配资源的个数。" - } - ], - "annotation": { - "constructor": true - }, - "desc": "初始化资源管理器。", - "name": "assets_manager_init", - "return": { - "type": "assets_manager_t*", - "desc": "返回asset manager对象。" - } - }, - { - "params": [ - { - "type": "assets_manager_t*", - "name": "am", - "desc": "asset manager对象。" + "name": "ms", + "desc": "睡眠时间(毫秒)。" } ], "annotation": {}, - "desc": "获取资源所在的目录(其下目录结构请参考demos)。", - "name": "assets_manager_get_res_root", + "desc": "睡眠指定时间。", + "name": "sleep_ms", "return": { - "type": "const char*", - "desc": "返回资源所在的目录。" + "type": "void", + "desc": "无。" } }, { - "params": [ - { - "type": "assets_manager_t*", - "name": "am", - "desc": "asset manager对象。" - }, - { - "type": "const char*", - "name": "res_root", - "desc": "资源所在的目录。" - } - ], + "params": [], "annotation": {}, - "desc": "设置资源所在的目录(其下目录结构请参考demos)。", - "name": "assets_manager_set_res_root", + "desc": "平台准备函数。", + "name": "platform_prepare", "return": { "type": "ret_t", "desc": "返回RET_OK表示成功,否则表示失败。" } - }, + } + ], + "events": [], + "properties": [], + "header": "tkc/platform.h", + "desc": "平台接口,包括:获取时间、休眠等函数。", + "name": "platform_t", + "annotation": { + "fake": true + }, + "level": 1 + }, + { + "type": "class", + "methods": [ { "params": [ { - "type": "assets_manager_t*", - "name": "am", - "desc": "asset manager对象。" + "type": "const char* path*", + "name": "path", + "desc": "路径。" }, { - "type": "const char*", - "name": "theme", - "desc": "主题名称。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置当前的主题。", - "name": "assets_manager_set_theme", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "assets_manager_t*", - "name": "am", - "desc": "asset manager对象。" - }, - { - "type": "system_info_t*", - "name": "system_info", - "desc": "system_info对象。。" - } - ], - "annotation": {}, - "desc": "设置system_info对象。", - "name": "assets_manager_set_system_info", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "assets_manager_t*", - "name": "am", - "desc": "asset manager对象。" - }, - { - "type": "locale_info_t*", - "name": "locale_info", - "desc": "locale_info对象。。" - } - ], - "annotation": {}, - "desc": "设置locale_info对象。", - "name": "assets_manager_set_locale_info", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "assets_manager_t*", - "name": "am", - "desc": "asset manager对象。" - }, - { - "type": "asset_info_t", - "name": "info", - "desc": "待增加的资源。" - } - ], - "annotation": {}, - "desc": "向资源管理器中增加一个资源。", - "name": "assets_manager_add", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "assets_manager_t*", - "name": "am", - "desc": "asset manager对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "待增加的资源的名字。" - }, - { - "type": "uint16_t", - "name": "type", - "desc": "待增加的资源的主类型枚举。" - }, - { - "type": "uint16_t", - "name": "subtype", - "desc": "待增加的资源的子类型枚举。" - }, - { - "type": "uint8_t*", - "name": "buff", - "desc": "待增加的资源的data数据。" + "type": "char*", + "name": "result", + "desc": "用于返回文件名。" }, { "type": "uint32_t", "name": "size", - "desc": "待增加的资源的data数据长度。" + "desc": "缓冲区大小。" } ], "annotation": {}, - "desc": "向资源管理器中增加一个资源data。", - "name": "assets_manager_add_data", + "desc": "返回文件名。", + "name": "path_basename", "return": { "type": "ret_t", "desc": "返回RET_OK表示成功,否则表示失败。" @@ -41421,49 +31928,24 @@ { "params": [ { - "type": "assets_manager_t*", - "name": "am", - "desc": "asset manager对象。" - }, - { - "type": "asset_type_t", - "name": "type", - "desc": "资源的类型。" + "type": "const char* path*", + "name": "path", + "desc": "路径。" }, { "type": "char*", - "name": "name", - "desc": "资源的名称。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "在资源管理器的缓存中查找指定的资源并引用它,如果缓存中不存在,尝试加载该资源。", - "name": "assets_manager_ref", - "return": { - "type": "asset_info_t*", - "desc": "返回资源。" - } - }, - { - "params": [ - { - "type": "assets_manager_t*", - "name": "am", - "desc": "asset manager对象。" + "name": "result", + "desc": "用于返回文件扩展名。" }, { - "type": "asset_info_t*", - "name": "info", - "desc": "资源。" + "type": "uint32_t", + "name": "size", + "desc": "缓冲区大小。" } ], - "annotation": { - "scriptable": true - }, - "desc": "释放指定的资源。", - "name": "assets_manager_unref", + "annotation": {}, + "desc": "返回文件扩展名。", + "name": "path_extname", "return": { "type": "ret_t", "desc": "返回RET_OK表示成功,否则表示失败。" @@ -41472,76 +31954,76 @@ { "params": [ { - "type": "assets_manager_t*", - "name": "am", - "desc": "asset manager对象。" - }, - { - "type": "asset_type_t", - "name": "type", - "desc": "资源的类型。" + "type": "const char* path*", + "name": "path", + "desc": "路径。" }, { "type": "char*", - "name": "name", - "desc": "资源的名称。" + "name": "result", + "desc": "用于返回目录。" + }, + { + "type": "uint32_t", + "name": "size", + "desc": "缓冲区大小。" } ], "annotation": {}, - "desc": "在资源管理器的缓存中查找指定的资源(不引用)。", - "name": "assets_manager_find_in_cache", + "desc": "返回目录。", + "name": "path_dirname", "return": { - "type": "asset_info_t*", - "desc": "返回资源。" + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" } }, { "params": [ { - "type": "assets_manager_t*", - "name": "am", - "desc": "asset manager对象。" - }, - { - "type": "asset_type_t", - "name": "type", - "desc": "资源的类型。" + "type": "const char* path*", + "name": "path", + "desc": "路径。" }, { "type": "char*", - "name": "name", - "desc": "资源的名称。" + "name": "result", + "desc": "用于返回规范后的路径。" + }, + { + "type": "uint32_t", + "name": "size", + "desc": "缓冲区大小。" } ], "annotation": {}, - "desc": "从文件系统中加载指定的资源,并缓存到内存中。在定义了宏WITH\\_FS\\_RES时才生效。", - "name": "assets_manager_load", + "desc": "规范路径字符形式。", + "name": "path_normalize", "return": { - "type": "asset_info_t*", - "desc": "返回资源。" + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" } }, { "params": [ { - "type": "assets_manager_t*", - "name": "am", - "desc": "asset manager对象。" - }, - { - "type": "asset_type_t", - "name": "type", - "desc": "资源的类型。" + "type": "const char* path*", + "name": "path", + "desc": "路径。" }, { "type": "char*", - "name": "name", - "desc": "资源的名称。" + "name": "result", + "desc": "用于返回绝对路径。" + }, + { + "type": "uint32_t", + "name": "size", + "desc": "缓冲区大小。" } ], "annotation": {}, - "desc": "从文件系统中加载指定的资源,并缓存到内存中。在定义了宏WITH\\_FS\\_RES时才生效。", - "name": "assets_manager_preload", + "desc": "返回绝对路径。", + "name": "path_abs", "return": { "type": "ret_t", "desc": "返回RET_OK表示成功,否则表示失败。" @@ -41550,19 +32032,35 @@ { "params": [ { - "type": "assets_manager_t*", - "name": "am", - "desc": "asset manager对象。" - }, - { - "type": "asset_loader_t*", - "name": "loader", - "desc": "加载器(由assets manager销毁)。" + "type": "const char* path*", + "name": "path", + "desc": "路径。" } ], "annotation": {}, - "desc": "设置loader。", - "name": "assets_manager_set_loader", + "desc": "判断路径是否为绝对路径。", + "name": "path_is_abs", + "return": { + "type": "ret_t", + "desc": "返回FALSE表示不是绝对路径,否则表示是绝对路径。" + } + }, + { + "params": [ + { + "type": "char*", + "name": "result", + "desc": "用于返回路径。" + }, + { + "type": "uint32_t", + "name": "size", + "desc": "缓冲区大小。" + } + ], + "annotation": {}, + "desc": "构造路径。\n\n> 可变参数为字符串,以NULL参数结束。", + "name": "path_build", "return": { "type": "ret_t", "desc": "返回RET_OK表示成功,否则表示失败。" @@ -41571,24 +32069,29 @@ { "params": [ { - "type": "assets_manager_t*", - "name": "am", - "desc": "asset manager对象。" + "type": "char*", + "name": "result", + "desc": "用于返回结果。" }, { - "type": "assets_manager_build_asset_dir_t", - "name": "custom_build_asset_dir", - "desc": "回调函数。" + "type": "uint32_t", + "name": "size", + "desc": "缓冲区大小。" }, { - "type": "void*", - "name": "ctx", - "desc": "回调函数的上下文。" + "type": "char*", + "name": "filename", + "desc": "原始文件路径。" + }, + { + "type": "char*", + "name": "basename", + "desc": "替换后的文件名。" } ], "annotation": {}, - "desc": "设置一个函数,该函数用于生成资源路径。\n\n> 有时我们需要优先加载用户自定义的资源,加载失败才加载系统缺省的,可用设置一个函数去实现这类功能。", - "name": "assets_manager_set_custom_build_asset_dir", + "desc": "替换文件名。", + "name": "path_replace_basename", "return": { "type": "ret_t", "desc": "返回RET_OK表示成功,否则表示失败。" @@ -41597,24 +32100,29 @@ { "params": [ { - "type": "assets_manager_t*", - "name": "am", - "desc": "asset manager对象。" + "type": "char*", + "name": "result", + "desc": "用于返回结果。" }, { - "type": "assets_manager_load_asset_t", - "name": "custom_load_asset", - "desc": "回调函数。" + "type": "uint32_t", + "name": "size", + "desc": "缓冲区大小。" }, { - "type": "void*", - "name": "ctx", - "desc": "回调函数的上下文。" + "type": "char*", + "name": "filename", + "desc": "原始文件路径。" + }, + { + "type": "char*", + "name": "extname", + "desc": "替换后的文件扩展名。" } ], "annotation": {}, - "desc": "设置一个函数,该函数用于实现自定义加载资源。\n\n> 如果不支持文件系统,开发者可以设置一个加载资源的回调函数,从flash或其它地方读取资源。", - "name": "assets_manager_set_custom_load_asset", + "desc": "替换文件扩展名。", + "name": "path_replace_extname", "return": { "type": "ret_t", "desc": "返回RET_OK表示成功,否则表示失败。" @@ -41623,19 +32131,14 @@ { "params": [ { - "type": "assets_manager_t*", - "name": "am", - "desc": "asset manager对象。" - }, - { - "type": "asset_type_t", - "name": "type", - "desc": "资源的类型。" + "type": "char*", + "name": "path", + "desc": "保存当前所在目录的路径。" } ], "annotation": {}, - "desc": "清除指定类型的缓存。", - "name": "assets_manager_clear_cache", + "desc": "获取当前所在目录。", + "name": "path_cwd", "return": { "type": "ret_t", "desc": "返回RET_OK表示成功,否则表示失败。" @@ -41644,14 +32147,14 @@ { "params": [ { - "type": "assets_manager_t*", - "name": "am", - "desc": "asset manager对象。" + "type": "char*", + "name": "path", + "desc": "保存可执行文件所在目录。" } ], "annotation": {}, - "desc": "清除全部缓存的资源。", - "name": "assets_manager_clear_all", + "desc": "获取可执行文件所在目录。", + "name": "path_exe", "return": { "type": "ret_t", "desc": "返回RET_OK表示成功,否则表示失败。" @@ -41660,14 +32163,14 @@ { "params": [ { - "type": "assets_manager_t*", - "name": "am", - "desc": "asset manager对象。" + "type": "char*", + "name": "path", + "desc": "保存app所在目录。" } ], "annotation": {}, - "desc": "释放全部资源。", - "name": "assets_manager_deinit", + "desc": "获取app所在目录。", + "name": "path_app_root", "return": { "type": "ret_t", "desc": "返回RET_OK表示成功,否则表示失败。" @@ -41675,32 +32178,6 @@ }, { "params": [ - { - "type": "assets_manager_t*", - "name": "am", - "desc": "asset manager对象。" - } - ], - "annotation": {}, - "desc": "释放全部资源并销毁asset manager对象。", - "name": "assets_manager_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "assets_manager_t*", - "name": "am", - "desc": "asset manager对象。" - }, - { - "type": "asset_type_t", - "name": "type", - "desc": "资源类型。" - }, { "type": "const char*", "name": "path", @@ -41708,1477 +32185,192 @@ } ], "annotation": {}, - "desc": "获取path里的资源。", - "name": "assets_manager_load_file", + "desc": "判断目录是否存在。", + "name": "path_exist", "return": { - "type": "asset_info_t*", - "desc": "返回asset_info_t。" + "type": "ret_t", + "desc": "返回TRUE表示成功,否则表示失败。" } } ], "events": [], "properties": [], - "header": "base/assets_manager.h", - "desc": "资源管理器。\n这里的资源管理器并非Windows下的文件浏览器,而是负责对各种资源,比如字体、主题、图片、界面数据、字符串和其它数据的进行集中管理的组件。引入资源管理器的目的有以下几个:\n\n* 让上层不需要了解存储的方式。\n在没有文件系统时或者内存紧缺时,把资源转成常量数组直接编译到代码中。在有文件系统而且内存充足时,资源放在文件系统中。在有网络时,资源也可以存放在服务器上(暂未实现)。资源管理器为上层提供统一的接口,让上层而不用关心底层的存储方式。\n\n* 让上层不需要了解资源的具体格式。\n比如一个名为earth的图片,没有文件系统或内存紧缺,图片直接用位图数据格式存在ROM中,而有文件系统时,则用PNG格式存放在文件系统中。资源管理器让上层不需要关心图片的格式,访问时指定图片的名称即可(不用指定扩展名)。\n\n* 让上层不需要了解屏幕的密度。\n不同的屏幕密度下需要加载不同的图片,比如MacPro的Retina屏就需要用双倍解析度的图片,否则就出现界面模糊。AWTK以后会支持PC软件和手机软件的开发,所以资源管理器需要为此提供支持,让上层不需关心屏幕的密度。\n\n* 对资源进行内存缓存。\n不同类型的资源使用方式是不一样的,比如字体和主题加载之后会一直使用,UI文件在生成界面之后就暂时不需要了,PNG文件解码之后就只需要保留解码的位图数据即可。资源管理器配合图片管理器等其它组件实现资源的自动缓存。\n\n当从文件系统加载资源时,目录结构要求如下:\n\n```\nassets/{theme}/raw/\nfonts 字体\nimages 图片\nx1 普通密度屏幕的图片。\nx2 2倍密度屏幕的图片。\nx3 3倍密度屏幕的图片。\nxx 密度无关的图片。\nstrings 需要翻译的字符串。\nstyles 主题数据。\nui UI描述数据。\n```", - "name": "assets_manager_t", - "parent": "emitter_t", - "annotation": { - "scriptable": true - }, - "level": 2 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "const char*", - "name": "assetname", - "desc": "资源的名称。" - } - ], - "annotation": { - "constructor": true - }, - "desc": "创建基于asset的data reader。\n\n> 不要直接调用,而是注册到 data\\_reader\\_factory后,通过data\\_reader\\_factory调用。", - "name": "data_reader_asset_create", - "return": { - "type": "data_reader_t*", - "desc": "返回data reader对象。" - } - }, - { - "params": [ - { - "type": "const char*", - "name": "name", - "desc": "资源的名称。" - }, - { - "type": "asset_type_t", - "name": "type", - "desc": "资源的类型。" - }, - { - "type": "char*", - "name": "url", - "desc": "生成的URL。" - } - ], - "annotation": { - "static": true - }, - "desc": "构造内存URL。", - "name": "data_reader_asset_build_url", - "return": { - "type": "const char*", - "desc": "返回URL。" - } - } - ], - "events": [], - "properties": [], - "header": "base/data_reader_asset.h", - "desc": "基于资源实现的 data_reader。通过 data_reader_factory 创建 reader 时,URL的格式如下(请用函数data_reader_asset_build_url生成):\n\n```\nasset://type/name\n```", - "name": "data_reader_asset_t", - "parent": "data_reader_t", + "header": "tkc/path.h", + "desc": "路径相关的工具函数。", + "name": "path_t", "annotation": { "fake": true }, - "level": 2 + "level": 1 }, { - "type": "class", - "methods": [ + "type": "enum", + "desc": "对象常见属性定义", + "consts": [ { - "params": [ - { - "type": "event_t*", - "name": "event", - "desc": "event对象。" - } - ], - "annotation": { - "cast": true, - "scriptable": true - }, - "desc": "把event对象转wheel_event_t对象,主要给脚本语言使用。", - "name": "wheel_event_cast", - "return": { - "type": "wheel_event_t*", - "desc": "event对象。" - } + "desc": "属性的个数。", + "name": "OBJECT_PROP_SIZE" }, { - "params": [ - { - "type": "wheel_event_t*", - "name": "event", - "desc": "event对象。" - }, - { - "type": "void*", - "name": "target", - "desc": "事件目标。" - }, - { - "type": "uint32_t", - "name": "type", - "desc": "事件类型。" - }, - { - "type": "int32_t", - "name": "dy", - "desc": "滚轮的y值。" - } - ], - "annotation": {}, - "desc": "初始化事件。", - "name": "wheel_event_init", - "return": { - "type": "event_t*", - "desc": "event对象。" - } + "desc": "属性是否勾选。", + "name": "OBJECT_PROP_CHECKED" } ], - "events": [], - "properties": [ - { - "name": "dy", - "desc": "滚轮的y值。", - "type": "int32_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "alt", - "desc": "alt键是否按下。", - "type": "bool_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "ctrl", - "desc": "ctrl键是否按下。", - "type": "bool_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "shift", - "desc": "shift键是否按下。", - "type": "bool_t", - "annotation": { - "readable": true, - "scriptable": true - } - } - ], - "header": "base/events.h", - "desc": "滚轮事件。", - "name": "wheel_event_t", - "annotation": { - "scriptable": true - }, - "parent": "event_t", - "level": 2 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "event_t*", - "name": "event", - "desc": "event对象。" - } - ], - "annotation": { - "cast": true, - "scriptable": true - }, - "desc": "把event对象转orientation_event_t对象,主要给脚本语言使用。", - "name": "orientation_event_cast", - "return": { - "type": "orientation_event_t*", - "desc": "event对象。" - } - }, - { - "params": [ - { - "type": "orientation_event_t*", - "name": "event", - "desc": "event对象。" - }, - { - "type": "void*", - "name": "target", - "desc": "事件目标。" - }, - { - "type": "uint32_t", - "name": "type", - "desc": "事件类型。" - }, - { - "type": "int32_t", - "name": "dy", - "desc": "滚轮的y值。" - } - ], - "annotation": {}, - "desc": "初始化事件。", - "name": "orientation_event_init", - "return": { - "type": "event_t*", - "desc": "event对象。" - } - } - ], - "events": [], - "properties": [ - { - "name": "orientation", - "desc": "屏幕方向。", - "type": "int32_t", - "annotation": { - "readable": true, - "scriptable": true - } - } - ], - "header": "base/events.h", - "desc": "滚轮事件。", - "name": "orientation_event_t", - "annotation": { - "scriptable": true - }, - "parent": "event_t", - "level": 2 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "event_t*", - "name": "event", - "desc": "event对象。" - } - ], - "annotation": { - "cast": true, - "scriptable": true - }, - "desc": "把event对象转value_change_event_t对象,主要给脚本语言使用。", - "name": "value_change_event_cast", - "return": { - "type": "value_change_event_t*", - "desc": "event对象。" - } - }, - { - "params": [ - { - "type": "value_change_event_t*", - "name": "event", - "desc": "event对象。" - }, - { - "type": "void*", - "name": "target", - "desc": "事件目标。" - }, - { - "type": "uint32_t", - "name": "type", - "desc": "事件类型。" - } - ], - "annotation": {}, - "desc": "初始化事件。", - "name": "value_change_event_init", - "return": { - "type": "event_t*", - "desc": "event对象。" - } - } - ], - "events": [], - "properties": [ - { - "name": "old_value", - "desc": "旧值。", - "type": "value_t", - "annotation": { - "readable": true - } - }, - { - "name": "new_value", - "desc": "新值。", - "type": "value_t", - "annotation": { - "readable": true - } - } - ], - "header": "base/events.h", - "desc": "值变化事件。", - "name": "value_change_event_t", - "annotation": { - "scriptable": true - }, - "parent": "event_t", - "level": 2 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "event_t*", - "name": "event", - "desc": "event对象。" - } - ], - "annotation": { - "cast": true, - "scriptable": true - }, - "desc": "把event对象转pointer_event_t对象,主要给脚本语言使用。", - "name": "pointer_event_cast", - "return": { - "type": "pointer_event_t*", - "desc": "event对象。" - } - }, - { - "params": [ - { - "type": "pointer_event_t*", - "name": "event", - "desc": "event对象。" - }, - { - "type": "void*", - "name": "target", - "desc": "事件目标。" - }, - { - "type": "uint32_t", - "name": "type", - "desc": "事件类型。" - }, - { - "type": "int32_t", - "name": "x", - "desc": "x的值。" - }, - { - "type": "int32_t", - "name": "y", - "desc": "y的值。" - } - ], - "annotation": {}, - "desc": "初始化事件。", - "name": "pointer_event_init", - "return": { - "type": "event_t*", - "desc": "event对象。" - } - } - ], - "events": [], - "properties": [ - { - "name": "x", - "desc": "x坐标。", - "type": "xy_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "y", - "desc": "y坐标。", - "type": "xy_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "button", - "desc": "button。", - "type": "uint8_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "pressed", - "desc": "指针是否按下。", - "type": "bool_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "alt", - "desc": "alt键是否按下。", - "type": "bool_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "ctrl", - "desc": "ctrl键是否按下。", - "type": "bool_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "cmd", - "desc": "cmd键是否按下。", - "type": "bool_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "menu", - "desc": "menu键是否按下。", - "type": "bool_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "shift", - "desc": "shift键是否按下。", - "type": "bool_t", - "annotation": { - "readable": true, - "scriptable": true - } - } - ], - "header": "base/events.h", - "desc": "指针事件。", - "name": "pointer_event_t", - "annotation": { - "scriptable": true - }, - "parent": "event_t", - "level": 2 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "event_t*", - "name": "event", - "desc": "event对象。" - } - ], - "annotation": { - "cast": true, - "scriptable": true - }, - "desc": "把event对象转key_event_t对象,主要给脚本语言使用。", - "name": "key_event_cast", - "return": { - "type": "key_event_t*", - "desc": "event对象。" - } - }, - { - "params": [ - { - "type": "key_event_t*", - "name": "event", - "desc": "event对象。" - }, - { - "type": "void*", - "name": "target", - "desc": "事件目标。" - }, - { - "type": "uint32_t", - "name": "type", - "desc": "事件类型。" - }, - { - "type": "int32_t", - "name": "key", - "desc": "key的值。" - } - ], - "annotation": {}, - "desc": "初始化事件。", - "name": "key_event_init", - "return": { - "type": "event_t*", - "desc": "event对象。" - } - } - ], - "events": [], - "properties": [ - { - "name": "key", - "desc": "键值。", - "type": "uint32_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "alt", - "desc": "alt键是否按下。", - "type": "bool_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "lalt", - "desc": "left alt键是否按下。", - "type": "bool_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "ralt", - "desc": "right alt键是否按下。", - "type": "bool_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "ctrl", - "desc": "right alt键是否按下。\nctrl键是否按下。", - "type": "bool_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "lctrl", - "desc": "left ctrl键是否按下。", - "type": "bool_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "rctrl", - "desc": "right ctrl键是否按下。", - "type": "bool_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "shift", - "desc": "shift键是否按下。", - "type": "bool_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "lshift", - "desc": "left shift键是否按下。", - "type": "bool_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "rshift", - "desc": "right shift键是否按下。", - "type": "bool_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "cmd", - "desc": "left shift键是否按下。\ncmd/win键是否按下。", - "type": "bool_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "menu", - "desc": "menu键是否按下。", - "type": "bool_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "capslock", - "desc": "capslock键是否按下。", - "type": "bool_t", - "annotation": { - "readable": true, - "scriptable": true - } - } - ], - "header": "base/events.h", - "desc": "按键事件。", - "name": "key_event_t", - "annotation": { - "scriptable": true - }, - "parent": "event_t", - "level": 2 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "event_t*", - "name": "event", - "desc": "event对象。" - } - ], - "annotation": { - "cast": true, - "scriptable": true - }, - "desc": "把event对象转paint_event_t对象。主要给脚本语言使用。", - "name": "paint_event_cast", - "return": { - "type": "paint_event_t*", - "desc": "event 对象。" - } - }, - { - "params": [ - { - "type": "paint_event_t*", - "name": "event", - "desc": "event对象。" - }, - { - "type": "void*", - "name": "target", - "desc": "事件目标。" - }, - { - "type": "uint32_t", - "name": "type", - "desc": "事件类型。" - }, - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - } - ], - "annotation": {}, - "desc": "初始化事件。", - "name": "paint_event_init", - "return": { - "type": "event_t*", - "desc": "event对象。" - } - } - ], - "events": [], - "properties": [ - { - "name": "c", - "desc": "canvas。", - "type": "canvas_t*", - "annotation": { - "readable": true, - "scriptable": true - } - } - ], - "header": "base/events.h", - "desc": "绘制事件。", - "name": "paint_event_t", - "annotation": { - "scriptable": true - }, - "parent": "event_t", - "level": 2 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "event_t*", - "name": "event", - "desc": "event对象。" - } - ], - "annotation": { - "cast": true, - "scriptable": true - }, - "desc": "把event对象转window_event_t对象。主要给脚本语言使用。", - "name": "window_event_cast", - "return": { - "type": "window_event_t*", - "desc": "对象。" - } - }, - { - "params": [ - { - "type": "window_event_t*", - "name": "event", - "desc": "event对象。" - }, - { - "type": "void*", - "name": "target", - "desc": "事件目标。" - }, - { - "type": "uint32_t", - "name": "type", - "desc": "事件类型。" - }, - { - "type": "widget_t*", - "name": "widget", - "desc": "window对象。" - } - ], - "annotation": {}, - "desc": "初始化事件。", - "name": "window_event_init", - "return": { - "type": "event_t*", - "desc": "event对象。" - } - }, - { - "params": [ - { - "type": "pointer_event_t*", - "name": "evt", - "desc": "指针事件对象。" - }, - { - "type": "system_info_t*", - "name": "info", - "desc": "系统信息。" - } - ], - "annotation": {}, - "desc": "根据屏幕旋转方向修正pointer_event中的坐标。", - "name": "pointer_event_rotate", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [ - { - "name": "window", - "desc": "canvas。", - "type": "widget_t*", - "annotation": { - "readable": true, - "scriptable": true - } - } - ], - "header": "base/events.h", - "desc": "窗口事件,由窗口管理器触发。", - "name": "window_event_t", - "annotation": { - "scriptable": true - }, - "parent": "event_t", - "level": 2 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "event_t*", - "name": "event", - "desc": "event对象。" - } - ], - "annotation": { - "cast": true, - "scriptable": true - }, - "desc": "把event对象转multi_gesture_event_t对象,主要给脚本语言使用。", - "name": "multi_gesture_event_cast", - "return": { - "type": "multi_gesture_event_t*", - "desc": "event对象。" - } - }, - { - "params": [ - { - "type": "multi_gesture_event_t*", - "name": "event", - "desc": "event对象。" - }, - { - "type": "void*", - "name": "target", - "desc": "事件目标。" - }, - { - "type": "int32_t", - "name": "x", - "desc": "x的值。" - }, - { - "type": "int32_t", - "name": "y", - "desc": "y的值。" - }, - { - "type": "float", - "name": "rotation", - "desc": "旋转角度(幅度)增量。" - }, - { - "type": "float", - "name": "distance", - "desc": "两点间的距离增量。(-1,0)表示缩小,(0-1)表示增加。" - } - ], - "annotation": {}, - "desc": "初始化事件。", - "name": "multi_gesture_event_init", - "return": { - "type": "event_t*", - "desc": "event对象。" - } - } - ], - "events": [], - "properties": [ - { - "name": "x", - "desc": "中心点x坐标。", - "type": "xy_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "y", - "desc": "中心点y坐标。", - "type": "xy_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "rotation", - "desc": "旋转角度(幅度)增量。(单位弧度)", - "type": "float", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "distance", - "desc": "两点间的距离增量。(-1,0)表示缩小,(0-1)表示增加。", - "type": "float", - "annotation": { - "readable": true, - "scriptable": true - } - } - ], - "header": "base/events.h", - "desc": "多点触摸手势事件。", - "name": "multi_gesture_event_t", - "annotation": { - "scriptable": true - }, - "parent": "event_t", - "level": 2 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "window_event_t*", - "name": "event", - "desc": "event对象。" - }, - { - "type": "assets_manager_t*", - "name": "am", - "desc": "事件目标资源管理器。" - }, - { - "type": "uint32_t", - "name": "type", - "desc": "事件类型。" - }, - { - "type": "asset_type_t", - "name": "asset_type", - "desc": "资源类型。" - }, - { - "type": "asset_info_t*", - "name": "asset_info", - "desc": "资源对象。" - } - ], - "annotation": {}, - "desc": "初始化事件。", - "name": "window_event_init", - "return": { - "type": "event_t*", - "desc": "event对象。" - } - } - ], - "events": [], - "properties": [ - { - "name": "type", - "desc": "触发事件的资源类型", - "type": "asset_type_t*", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "asset_info", - "desc": "触发事件的资源对象", - "type": "asset_info_t*", - "annotation": { - "readable": true, - "scriptable": true - } - } - ], - "header": "base/events.h", - "desc": "资源事件,由资源管理器触发。", - "name": "assets_event_t", - "annotation": { - "scriptable": true - }, - "parent": "event_t", - "level": 2 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "image对象。" - }, - { - "type": "char*", - "name": "name", - "desc": "图片名称,该图片必须存在于资源管理器。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置控件的图片名称。\n\n> 如果需要显示文件系统中的图片,只需将图片名称换成实际的文件名,并加上\"file://\"前缀即可。", - "name": "image_base_set_image", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "float_t", - "name": "rotation", - "desc": "旋转角度(幅度)。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置控件的旋转角度(仅在WITH_VGCANVAS定义时生效)。", - "name": "image_base_set_rotation", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "float_t", - "name": "scale_x", - "desc": "X方向缩放比例。" - }, - { - "type": "float_t", - "name": "scale_y", - "desc": "Y方向缩放比例。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置控件的缩放比例(仅在WITH_VGCANVAS定义时生效)。", - "name": "image_base_set_scale", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "float_t", - "name": "anchor_x", - "desc": "锚点X(0-1)。0在控件左边,0.5在控件中间,1在控件右边。" - }, - { - "type": "float_t", - "name": "anchor_y", - "desc": "锚点Y(0-1)。0在控件顶部,0.5在控件中间,1在控件底部。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置控件的锚点(仅在WITH_VGCANVAS定义时生效)。", - "name": "image_base_set_anchor", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "bool_t", - "name": "selected", - "desc": "是否被选中。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置控件的选中状态。", - "name": "image_base_set_selected", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "bool_t", - "name": "selectable", - "desc": "是否可以被选中。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置控件是否可以被选中。", - "name": "image_base_set_selectable", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "bool_t", - "name": "clickable", - "desc": "是否可以被点击。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置控件是否可以被点击。", - "name": "image_base_set_clickable", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "image_base对象。" - } - ], - "annotation": { - "cast": true, - "scriptable": true - }, - "desc": "转换为image_base对象(供脚本语言使用)。", - "name": "image_base_cast", - "return": { - "type": "widget_t*", - "desc": "image_base对象。" - } - } - ], - "events": [], - "properties": [ - { - "name": "image", - "desc": "图片的名称。", - "type": "char*", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "anchor_x", - "desc": "锚点X(0-1)。0在控件左边,0.5在控件中间,1在控件右边。", - "type": "float_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "anchor_y", - "desc": "锚点Y(0-1)。0在控件顶部,0.5在控件中间,1在控件底部。", - "type": "float_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "scale_x", - "desc": "控件在X方向上的缩放比例。", - "type": "float_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "scale_y", - "desc": "控件在Y方向上的缩放比例。", - "type": "float_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "rotation", - "desc": "控件的旋转角度(幅度)。", - "type": "float_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "clickable", - "desc": "点击时,是否触发EVT_CLICK事件。", - "type": "bool_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "selectable", - "desc": "是否设置选中状态。", - "type": "bool_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "selected", - "desc": "当前是否被选中。", - "type": "bool_t", - "annotation": { - "readable": true, - "scriptable": true - } - } - ], - "header": "base/image_base.h", - "desc": "图片控件基类。\n\n本类把图片相关控件的公共行为进行抽象,放到一起方便重用。目前已知的具体实现如下图:\n\n```graphviz\n[default_style]\n\nimage_t -> image_base_t[arrowhead = \"empty\"]\nsvg_image_t -> image_base_t[arrowhead = \"empty\"]\ngif_image_t -> image_base_t[arrowhead = \"empty\"]\n```\n\n> 本类是一个抽象类,不能进行实例化。请在应用程序中使用具体的类,如image\\_t。\n\n如果需要显示文件系统中的图片,只需将图片名称换成实际的文件名,并加上\"file://\"前缀即可。如:\n\n```\n\n\n\n```", - "name": "image_base_t", - "parent": "widget_t", + "header": "tkc/object.h", + "name": "object_prop_t", + "prefix": "OBJECT_PROP_", "annotation": { "scriptable": true, - "widget": true + "string": true }, - "level": 2 + "level": 1 }, { - "type": "class", - "methods": [ + "type": "enum", + "desc": "对象常见命令定义", + "consts": [ { - "params": [ - { - "type": "im_commit_event_t*", - "name": "e", - "desc": "事件对象。" - }, - { - "type": "const char*", - "name": "text", - "desc": "文本。" - }, - { - "type": "bool_t", - "name": "replace", - "desc": "是否替代当前的内容。" - } - ], - "annotation": {}, - "desc": "初始化im_commit事件。", - "name": "im_commit_event_init", - "return": { - "type": "event_t*", - "desc": "返回事件对象。" - } - } - ], - "events": [], - "properties": [ - { - "name": "text", - "desc": "提交的文本。", - "type": "char*", - "annotation": { - "readable": true - } + "desc": "保存命令", + "name": "OBJECT_CMD_SAVE" }, { - "name": "replace", - "desc": "是否替换原来的文本。", - "type": "bool_t", - "annotation": { - "readable": true - } + "desc": "重新加载命令", + "name": "OBJECT_CMD_RELOAD" + }, + { + "desc": "和前一个属性交换位置\n>参数为属性的名称或路径。", + "name": "OBJECT_CMD_MOVE_UP" + }, + { + "desc": "和后一个属性交换位置\n>参数为属性的名称或路径。", + "name": "OBJECT_CMD_MOVE_DOWN" + }, + { + "desc": "删除属性。\n>参数为属性的名称或路径。", + "name": "OBJECT_CMD_REMOVE" + }, + { + "desc": "删除勾选的属性。\n>参数为属性的名称或路径。", + "name": "OBJECT_CMD_REMOVE_CHECKED" + }, + { + "desc": "清除全部属性。\n>参数为属性的名称或路径。", + "name": "OBJECT_CMD_CLEAR" + }, + { + "desc": "增加子项。\n>参数为属性的名称或路径。", + "name": "OBJECT_CMD_ADD" + }, + { + "desc": "显示对象详细信息。\n>参数为属性的名称或路径。", + "name": "OBJECT_CMD_DETAIL" + }, + { + "desc": "编辑子项。\n>参数为属性的名称或路径。", + "name": "OBJECT_CMD_EDIT" } ], - "header": "base/input_method.h", - "desc": "输入法提交输入的文本事件。", - "name": "im_commit_event_t", - "parent": "event_t", - "level": 2 + "header": "tkc/object.h", + "name": "object_cmd_t", + "prefix": "OBJECT_CMD_", + "annotation": { + "scriptable": true, + "string": true + }, + "level": 1 }, { - "type": "class", - "methods": [], - "events": [], - "properties": [ + "type": "enum", + "desc": "图片绘制方法常量定义。", + "consts": [ { - "name": "text", - "desc": "软键盘上的action按钮显示的文本。", - "type": "char*", - "annotation": { - "readable": true - } + "desc": "缺省显示。将图片按原大小显示在目标矩形的左上角。", + "name": "IMAGE_DRAW_DEFAULT" }, { - "name": "enable", - "desc": "软键盘上的action按钮启用。", - "type": "bool_t", - "annotation": { - "readable": true - } + "desc": "居中显示。将图片按原大小显示在目标矩形的中央。", + "name": "IMAGE_DRAW_CENTER" + }, + { + "desc": "图标显示。同居中显示,但会根据屏幕密度调整大小。", + "name": "IMAGE_DRAW_ICON" + }, + { + "desc": "缩放显示。将图片缩放至目标矩形的大小(不保证宽高成比例)。", + "name": "IMAGE_DRAW_SCALE" + }, + { + "desc": "自动缩放显示。将图片缩放至目标矩形的宽度或高度(选取最小的比例),并居中显示。", + "name": "IMAGE_DRAW_SCALE_AUTO" + }, + { + "desc": "如果图片比目标矩形大,自动缩小显示,否则居中显示。", + "name": "IMAGE_DRAW_SCALE_DOWN" + }, + { + "desc": "宽度缩放显示。 将图片缩放至目标矩形的宽度,高度按此比例进行缩放,超出不部分不显示。", + "name": "IMAGE_DRAW_SCALE_W" + }, + { + "desc": "高度缩放显示。将图片缩放至目标矩形的高度,宽度按此比例进行缩放,超出不部分不显示。", + "name": "IMAGE_DRAW_SCALE_H" + }, + { + "desc": "平铺显示。", + "name": "IMAGE_DRAW_REPEAT" + }, + { + "desc": "水平方向平铺显示,垂直方向缩放。", + "name": "IMAGE_DRAW_REPEAT_X" + }, + { + "desc": "垂直方向平铺显示,水平方向缩放。", + "name": "IMAGE_DRAW_REPEAT_Y" + }, + { + "desc": "垂直方向平铺显示,水平方向缩放(从底部到顶部)。", + "name": "IMAGE_DRAW_REPEAT_Y_INVERSE" + }, + { + "desc": "9宫格显示。\n将图片分成等大小的9块,4个角按原大小显示在目标矩形的4个角,左右上下和中间5块分别缩放显示在对应的目标区域。", + "name": "IMAGE_DRAW_PATCH9" + }, + { + "desc": "水平方向3宫格显示,垂直方向居中显示。\n将图片在水平方向上分成等大小的3块,左右两块按原大小显示在目标矩形的左右,中间一块缩放显示在目标区域中间剩余部分。", + "name": "IMAGE_DRAW_PATCH3_X" + }, + { + "desc": "垂直方向3宫格显示,水平方向居中显示。\n将图片在垂直方向上分成等大小的3块,上下两块按原大小显示在目标矩形的上下,中间一块缩放显示在目标区域中间剩余部分。", + "name": "IMAGE_DRAW_PATCH3_Y" + }, + { + "desc": "水平方向3宫格显示,垂直方向缩放显示。\n将图片在水平方向上分成等大小的3块,左右两块按原大小显示在目标矩形的左右,中间一块缩放显示在目标区域中间剩余部分。", + "name": "IMAGE_DRAW_PATCH3_X_SCALE_Y" + }, + { + "desc": "垂直方向3宫格显示,水平方向缩放显示。\n将图片在垂直方向上分成等大小的3块,上下两块按原大小显示在目标矩形的上下,中间一块缩放显示在目标区域中间剩余部分。", + "name": "IMAGE_DRAW_PATCH3_Y_SCALE_X" + }, + { + "desc": "平铺9宫格显示。\n将图片分成4个角和5块平铺块,4个角按原大小显示在目标矩形的4个角,其余5块会平铺对应的目标区域。\n切割方法为(如下图):\n如果图片宽度为奇数,则中间一块为一列数据,如果图片宽度为偶数,则中间一块为二列数据,其他数据分为左右块\n如果图片高度为奇数,则中间一块为一行数据,如果图片高度为偶数,则中间一块为二行数据,其他数据分为上下块\n中间一块数据根据上面两条规则组成4中情况,分别是一列一行数据,一列两行数据,两列一行数据和两行两列数据", + "name": "IMAGE_DRAW_REPEAT9" + }, + { + "desc": "水平方向3宫格显示,垂直方向居中显示。\n将图片在水平方向上分成左右相等两块和中间一块,如果图片宽度为奇数,则中间一块为一列数据,如果图片宽度为偶数,则中间一块为二列数据,其他数据分为左右块。\n左右两块按原大小显示在目标矩形的左右,中间一列像素点平铺显示在目标区域中间剩余部分。", + "name": "IMAGE_DRAW_REPEAT3_X" + }, + { + "desc": "垂直方向3宫格显示,水平方向居中显示。\n将图片在垂直方向上分成上下相等两块和中间一块,如果图片高度为奇数,则中间一块为一行数据,如果图片高度为偶数,则中间一块为二行数据,其他数据分为上下块\n上下两块按原大小显示在目标矩形的上下,中间一块平铺显示在目标区域中间剩余部分。", + "name": "IMAGE_DRAW_REPEAT3_Y" } ], - "header": "base/input_method.h", - "desc": "设置软键盘上的action按钮的信息事件。", - "name": "im_action_button_info_event_t", - "parent": "event_t", - "level": 2 - }, - { - "type": "class", - "methods": [], - "events": [], - "properties": [ - { - "name": "candidates", - "desc": "可选的文本,多个文本以\\0分隔。如:里\\0李\\0力\\0离\\0", - "type": "char*", - "annotation": { - "readable": true - } - }, - { - "name": "candidates_nr", - "desc": "可选的文本的个数。", - "type": "uint32_t", - "annotation": { - "readable": true - } - }, - { - "name": "selected", - "desc": "缺省选中某个候选字,小于0不选择任何候选字。", - "type": "int32_t", - "annotation": { - "readable": true - } - } - ], - "header": "base/input_method.h", - "desc": "输入法请求显示候选字的事件。", - "name": "im_candidates_event_t", - "parent": "event_t", - "level": 2 - }, - { - "type": "class", - "methods": [], - "events": [], - "properties": [], - "header": "base/lcd_profile.h", - "desc": "对现有LCD对象进行包装,实现对各个函数的时间统计,用于辅助定位性能瓶颈。", - "name": "lcd_profile_t", - "parent": "lcd_t", - "level": 2 + "header": "base/bitmap.h", + "name": "image_draw_type_t", + "prefix": "IMAGE_DRAW_", + "annotation": { + "scriptable": true + }, + "level": 1 }, { "type": "class", @@ -43186,33 +32378,70 @@ { "params": [], "annotation": { - "constructor": true + "constructor": true, + "scriptable": true, + "gc": true }, - "desc": "创建只读的style对象。", - "name": "style_const_create", + "desc": "创建named_value对象。", + "name": "named_value_create", "return": { - "type": "style_t*", - "desc": "返回style对象。" + "type": "named_value_t*", + "desc": "返回named_value对象。" } - } - ], - "events": [], - "properties": [], - "header": "base/style_const.h", - "desc": "只读的style,从theme\\_t中获取数据。\n\ntools/theme_gen用于把XML的主题数据转换成常量数据。", - "name": "style_const_t", - "parent": "style_t", - "level": 2 - }, - { - "type": "class", - "methods": [ + }, { "params": [ { - "type": "style_t*", - "name": "s", - "desc": "style对象。" + "type": "named_value_t*", + "name": "nv", + "desc": "named_value对象。" + }, + { + "type": "const char*", + "name": "name", + "desc": "名称。" + }, + { + "type": "const value_t*", + "name": "value", + "desc": "值。" + } + ], + "annotation": { + "constructor": true + }, + "desc": "初始化。", + "name": "named_value_init", + "return": { + "type": "ret_t", + "desc": "返回named_value对象。" + } + }, + { + "params": [ + { + "type": "named_value_t*", + "name": "nv", + "desc": "named_value对象。" + } + ], + "annotation": { + "cast": true, + "scriptable": true + }, + "desc": "转换为named_value对象(供脚本语言使用)。", + "name": "named_value_cast", + "return": { + "type": "named_value_t*", + "desc": "返回named_value对象。" + } + }, + { + "params": [ + { + "type": "named_value_t*", + "name": "nv", + "desc": "named_value对象。" }, { "type": "const char*", @@ -43223,8 +32452,8 @@ "annotation": { "scriptable": true }, - "desc": "设置style的名称。", - "name": "style_mutable_set_name", + "desc": "设置名称。", + "name": "named_value_set_name", "return": { "type": "ret_t", "desc": "返回RET_OK表示成功,否则表示失败。" @@ -43233,150 +32462,21 @@ { "params": [ { - "type": "style_t*", - "name": "s", - "desc": "style对象。" - }, - { - "type": "const char*", - "name": "state", - "desc": "控件状态。" - }, - { - "type": "const char*", - "name": "name", - "desc": "属性名。" - }, - { - "type": "uint32_t", - "name": "val", - "desc": "值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置指定名称整数格式的值。", - "name": "style_mutable_set_int", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "style_t*", - "name": "s", - "desc": "style对象。" - }, - { - "type": "const char*", - "name": "state", - "desc": "控件状态。" - }, - { - "type": "const char*", - "name": "name", - "desc": "属性名。" - }, - { - "type": "color_t", - "name": "val", - "desc": "值。" - } - ], - "annotation": {}, - "desc": "设置指定名称的颜色值。", - "name": "style_mutable_set_color", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "style_t*", - "name": "s", - "desc": "style对象。" - }, - { - "type": "const char*", - "name": "state", - "desc": "控件状态。" - }, - { - "type": "const char*", - "name": "name", - "desc": "属性名。" - }, - { - "type": "const char*", - "name": "val", - "desc": "值。" - } - ], - "annotation": {}, - "desc": "设置指定名称字符串的值。", - "name": "style_mutable_set_str", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "style_t*", - "name": "s", - "desc": "style对象。" - }, - { - "type": "tk_on_style_item_t", - "name": "on_style_item", - "desc": "回调函数。" - }, - { - "type": "void*", - "name": "ctx", - "desc": "回调函数的上下文。" - } - ], - "annotation": {}, - "desc": "遍历。对每项调用回调函数on\\_style\\_item。", - "name": "style_mutable_foreach", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "style_t*", - "name": "s", - "desc": "style对象。" - }, - { - "type": "const char*", - "name": "state", - "desc": "控件状态。" - }, - { - "type": "const char*", - "name": "name", - "desc": "属性名。" + "type": "named_value_t*", + "name": "nv", + "desc": "named_value对象。" }, { "type": "const value_t*", - "name": "v", + "name": "value", "desc": "值。" } ], - "annotation": {}, - "desc": "获取指定名称的值。", - "name": "style_mutable_get_value", + "annotation": { + "scriptable": true + }, + "desc": "设置值。", + "name": "named_value_set_value", "return": { "type": "ret_t", "desc": "返回RET_OK表示成功,否则表示失败。" @@ -43385,119 +32485,54 @@ { "params": [ { - "type": "style_t*", - "name": "s", - "desc": "style对象。" - }, - { - "type": "const char*", - "name": "state", - "desc": "控件状态。" - }, - { - "type": "const char*", - "name": "name", - "desc": "属性名。" - }, - { - "type": "const value_t*", - "name": "v", - "desc": "值。" - } - ], - "annotation": {}, - "desc": "设置指定名称的值。", - "name": "style_mutable_set_value", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "style_t*", - "name": "s", - "desc": "style对象。" - }, - { - "type": "style_t*", - "name": "other", - "desc": "style对象。" - } - ], - "annotation": {}, - "desc": "将other对象的数据拷贝到s对象。", - "name": "style_mutable_copy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "style_t*", - "name": "s", - "desc": "style对象。" - } - ], - "annotation": {}, - "desc": "清空s对象。", - "name": "style_mutable_reset", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "style_t*", - "name": "s", - "desc": "style对象。" + "type": "named_value_t*", + "name": "nv", + "desc": "named_value对象。" } ], "annotation": { - "cast": true, "scriptable": true }, - "desc": "转换为style_mutable对象。", - "name": "style_mutable_cast", + "desc": "获取值对象(主要给脚本语言使用)。", + "name": "named_value_get_value", "return": { - "type": "style_t*", - "desc": "style对象。" + "type": "value_t*", + "desc": "返回值对象。" } }, { "params": [ { - "type": "widget_t*", - "name": "widget", - "desc": "控件" - }, - { - "type": "style_t*", - "name": "default_style", - "desc": "缺省的style。" + "type": "named_value_t*", + "name": "nv", + "desc": "named_value对象。" } ], "annotation": { - "constructor": true, - "scriptable": true + "deconstructor": true }, - "desc": "创建style\\_mutable对象。\n\n> 除了测试程序外不需要直接调用,widget会通过style\\_factory\\_create创建。", - "name": "style_mutable_create", + "desc": "重置named_value对象。", + "name": "named_value_deinit", "return": { - "type": "style_t*", - "desc": "style对象。" + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" } }, { - "params": [], - "annotation": {}, - "desc": "将自己注册到style\\_factory。", - "name": "style_mutable_register", + "params": [ + { + "type": "named_value_t*", + "name": "nv", + "desc": "named_value对象。" + } + ], + "annotation": { + "deconstructor": true, + "scriptable": true, + "gc": true + }, + "desc": "销毁named_value对象。", + "name": "named_value_destroy", "return": { "type": "ret_t", "desc": "返回RET_OK表示成功,否则表示失败。" @@ -43516,1302 +32551,191 @@ } }, { - "name": "widget", - "desc": "与之关联的控件。", - "type": "widget_t*", - "annotation": { - "private": true - } - }, - { - "name": "default_style", - "desc": "缺省的style,在mutable中找不到时,再到default_style中找。", - "type": "style_t*", - "annotation": { - "private": true - } - }, - { - "name": "styles", - "desc": "控件在不同状态下的style。", - "type": "widget_state_style_t*", - "annotation": { - "private": true - } - } - ], - "header": "base/style_mutable.h", - "desc": "可变的style(可实时修改并生效,主要用于在designer中被编辑的控件,或者一些特殊控件)。\n\nstyle\\_mutable也对style\\_const进行了包装,当用户没修改某个值时,便从style\\_const中获取。", - "name": "style_mutable_t", - "parent": "style_t", - "annotation": { - "scriptable": true - }, - "level": 2 - }, - { - "type": "class", - "methods": [ - { - "params": [], - "annotation": { - "constructor": true - }, - "desc": "获取缺省的控件工厂对象。", - "name": "widget_factory", - "alias": "widget_factory_instance", - "return": { - "type": "widget_factory_t*", - "desc": "返回控件工厂对象。" - } - }, - { - "params": [ - { - "type": "widget_factory_t*", - "name": "factory", - "desc": "控件工厂对象。" - } - ], - "annotation": {}, - "desc": "设置缺省的控件工厂对象。", - "name": "widget_factory_set", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [], - "annotation": { - "constructor": true - }, - "desc": "创建控件工厂对象。", - "name": "widget_factory_create", - "return": { - "type": "widget_factory_t*", - "desc": "返回控件工厂对象。" - } - }, - { - "params": [ - { - "type": "widget_factory_t*", - "name": "factory", - "desc": "控件工厂对象。" - }, - { - "type": "const char*", - "name": "type", - "desc": "控件类型。" - }, - { - "type": "widget_create_t", - "name": "create", - "desc": "创建函数。" - } - ], - "annotation": {}, - "desc": "注册控件创建函数。", - "name": "widget_factory_register", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_factory_t*", - "name": "factory", - "desc": "控件工厂对象。" - }, - { - "type": "const char*", - "name": "type", - "desc": "控件类型。" - }, - { - "type": "xy_t", - "name": "x", - "desc": "初始X坐标。" - }, - { - "type": "xy_t", - "name": "y", - "desc": "初始Y坐标。" - }, - { - "type": "xy_t", - "name": "w", - "desc": "初始宽度。" - }, - { - "type": "xy_t", - "name": "h", - "desc": "初始高度。" - } - ], - "annotation": { - "constructor": true - }, - "desc": "创建指定类型的控件。", - "name": "widget_factory_create_widget", - "return": { - "type": "widget_t*", - "desc": "返回控件对象。" - } - }, - { - "params": [ - { - "type": "widget_factory_t*", - "name": "factory", - "desc": "控件工厂对象。" - } - ], - "annotation": {}, - "desc": "析构并释放控件工厂对象。", - "name": "widget_factory_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [], - "header": "base/widget_factory.h", - "desc": "控件工厂对象。\n\n提供通过类型创建控件的能力。\n用户注册自定义控件,可以获得内置控件同等待遇。", - "name": "widget_factory_t", - "parent": "emitter_t", - "level": 2 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "window_base对象。" - } - ], - "annotation": {}, - "desc": "窗口on_destroy函数的缺省实现。", - "name": "window_base_on_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "window_base对象。" - }, - { - "type": "event_t*", - "name": "e", - "desc": "event对象。" - } - ], - "annotation": {}, - "desc": "窗口on_event函数的缺省实现。", - "name": "window_base_on_event", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "window_base对象。" - }, - { - "type": "const rect_t*", - "name": "rect", - "desc": "rect对象。" - } - ], - "annotation": {}, - "desc": "窗口on_invalidate函数的缺省实现。", - "name": "window_base_invalidate", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "window_base对象。" - }, - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - } - ], - "annotation": {}, - "desc": "窗口on_paint_begin函数的缺省实现。", - "name": "window_base_on_paint_begin", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "window_base对象。" - }, - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - } - ], - "annotation": {}, - "desc": "窗口on_paint_end函数的缺省实现。", - "name": "window_base_on_paint_end", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。1" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "window_base对象。" - }, - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - } - ], - "annotation": {}, - "desc": "窗口on_paint_self函数的缺省实现。", - "name": "window_base_on_paint_self", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "window_base对象。g" - }, - { - "type": "const char*", - "name": "name", - "desc": "属性名。" - }, - { - "type": "value_t*", - "name": "v", - "desc": "value对象" - } - ], - "annotation": {}, - "desc": "窗口get_prop函数的缺省实现。", - "name": "window_base_get_prop", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "window_base对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "属性名。" - }, - { - "type": "const value_t*", - "name": "v", - "desc": "value对象" - } - ], - "annotation": {}, - "desc": "窗口set_prop函数的缺省实现。", - "name": "window_base_set_prop", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "parent", - "desc": "父控件" - }, - { - "type": "const widget_vtable_t*", - "name": "vt", - "desc": "vtable对象。" - }, - { - "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": "创建window base对象。", - "name": "window_base_create", - "return": { - "type": "widget_t*", - "desc": "窗口对象。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "window_base对象。" - } - ], - "annotation": { - "cast": true, - "scriptable": true - }, - "desc": "转换为window_base对象(供脚本语言使用)。", - "name": "window_base_cast", - "return": { - "type": "widget_t*", - "desc": "window_base对象。" - } - } - ], - "events": [ - { - "name": "EVT_WINDOW_WILL_OPEN", - "desc": "窗口即将打开事件。 如果有窗口动画,在窗口动画开始前触发。如果没有窗口动画,在窗口被加载后的下一次循环中触发。", - "type": "event_t" - }, - { - "name": "EVT_WINDOW_OPEN", - "desc": "窗口打开事件。 如果有窗口动画,在窗口动画完成时触发。如果没有窗口动画,在窗口被加载后的下一次循环中触发。", - "type": "event_t" - }, - { - "name": "EVT_WINDOW_TO_BACKGROUND", - "desc": "窗口被切换到后台事件。 打开新窗口时,当前窗口被切换到后台时,对当前窗口触发本事件。", - "type": "event_t" - }, - { - "name": "EVT_WINDOW_TO_FOREGROUND", - "desc": "窗口被切换到前台事件。 关闭当前窗口时,前一个窗口被切换到前台时,对前一个窗口触发本事件。", - "type": "event_t" - }, - { - "name": "EVT_WINDOW_CLOSE", - "desc": "窗口关闭事件。", - "type": "event_t" - } - ], - "properties": [ - { - "name": "theme", - "desc": "主题资源的名称。\n每个窗口都可以有独立的主题文件,如果没指定,则使用系统缺省的主题文件。\n主题是一个XML文件,放在assets/raw/styles目录下。\n请参考[主题](https://github.com/zlgopen/awtk/blob/master/docs/theme.md)", - "type": "char*", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "disable_anim", - "desc": "禁用窗口动画。", - "type": "bool_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "closable", - "desc": "收到EVT_REQUEST_CLOSE_WINDOW是否自动关闭窗口。\n\n如果关闭窗口时,需要用户确认:\n\n* 1.将closable设置为WINDOW\\_CLOSABLE\\_CONFIRM\n\n* 2.处理窗口的EVT\\_REQUEST\\_CLOSE\\_WINDOW事件\n\n> closable在XML中取值为:yes/no/confirm,缺省为yes。", - "type": "window_closable_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "open_anim_hint", - "desc": "打开窗口动画的名称。\n请参考[窗口动画](https://github.com/zlgopen/awtk/blob/master/docs/window_animator.md)", - "type": "char*", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "close_anim_hint", - "desc": "关闭窗口动画的名称。\n请参考[窗口动画](https://github.com/zlgopen/awtk/blob/master/docs/window_animator.md)", - "type": "char*", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "stage", - "desc": "窗口当前处于的状态。", - "type": "char*", - "annotation": { - "readable": true, - "get_prop": true - } - }, - { - "name": "theme_obj", - "desc": "窗口的常量主题数据。\n\n>\n把主题管理器对象与窗口关联起来,是为了解决UI设计器与被设计的窗口需要从不同的位置加载主题资源的问题。", - "type": "theme_t*", - "annotation": { - "get_prop": true - } - }, - { - "name": "image_manager", - "desc": "获取图片管理器对象。\n\n>\n把图片管理器对象与窗口关联起来,是为了解决UI设计器与被设计的窗口需要从不同的位置加载图片资源的问题。", - "type": "image_manager_t*", - "annotation": { - "get_prop": true - } - }, - { - "name": "font_manager", - "desc": "获取字体管理器对象。\n\n>\n把字体管理器对象与窗口关联起来,是为了解决UI设计器与被设计的窗口需要从不同的位置加载字体资源的问题。", - "type": "font_manager_t*", - "annotation": { - "get_prop": true - } - }, - { - "name": "assets_manager", - "desc": "获取资源管理器对象。\n\n>\n把资源管理器对象与窗口关联起来,是为了解决UI设计器与被设计的窗口需要从不同的位置加载资源资源的问题。", - "type": "assets_manager_t*", - "annotation": { - "get_prop": true - } - }, - { - "name": "move_focus_prev_key", - "desc": "向前移动焦点的键值。\n\n请参考[控件焦点](https://github.com/zlgopen/awtk/blob/master/docs/widget_focus.md)", - "type": "char*", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "move_focus_next_key", - "desc": "向后移动焦点的键值。\n\n请参考[控件焦点](https://github.com/zlgopen/awtk/blob/master/docs/widget_focus.md)", - "type": "char*", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "move_focus_up_key", - "desc": "向上移动焦点的键值。\n\n请参考[控件焦点](https://github.com/zlgopen/awtk/blob/master/docs/widget_focus.md)", - "type": "char*", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "move_focus_down_key", - "desc": "向下移动焦点的键值。\n\n请参考[控件焦点](https://github.com/zlgopen/awtk/blob/master/docs/widget_focus.md)", - "type": "char*", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "move_focus_left_key", - "desc": "向左移动焦点的键值。\n\n请参考[控件焦点](https://github.com/zlgopen/awtk/blob/master/docs/widget_focus.md)", - "type": "char*", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "move_focus_right_key", - "desc": "向右移动焦点的键值。\n\n请参考[控件焦点](https://github.com/zlgopen/awtk/blob/master/docs/widget_focus.md)", - "type": "char*", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "single_instance", - "desc": "单例。如果窗口存在,先关闭再打开。", - "type": "bool_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - } - ], - "header": "base/window_base.h", - "desc": "窗口。\n\n本类把窗口相关的公共行为进行抽象,放到一起方便重用。目前已知的具体实现如下图:\n\n```graphviz\n[default_style]\n\nwindow_t -> window_base_t[arrowhead = \"empty\"]\npopup_t -> window_base_t[arrowhead = \"empty\"]\ndialog_t -> window_base_t[arrowhead = \"empty\"]\nsystem_bar_t -> window_base_t[arrowhead = \"empty\"]\ncalibration_win_t -> window_base_t[arrowhead = \"empty\"]\n```\n\n> 本类是一个抽象类,不能进行实例化。请在应用程序中使用具体的类,如window\\_t。", - "name": "window_base_t", - "parent": "widget_t", - "annotation": { - "scriptable": true, - "widget": true - }, - "level": 2 - }, - { - "type": "class", - "methods": [ - { - "params": [], - "annotation": { - "constructor": true, - "scriptable": true, - "cast": true - }, - "desc": "获取全局window_manager对象", - "name": "window_manager", - "alias": "window_manager_instance", - "return": { - "type": "widget_t*", - "desc": "对象。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "window_manager对象。" - } - ], - "annotation": { - "cast": true, - "scriptable": true - }, - "desc": "转换为window_manager对象(供脚本语言使用)。", - "name": "window_manager_cast", - "return": { - "type": "widget_t*", - "desc": "window_manager对象。" - } - }, - { - "params": [ - { - "type": "window_manager_t*", - "name": "widget", - "desc": "窗口管理器对象。" - } - ], - "annotation": {}, - "desc": "设置缺省的窗口管理器。", - "name": "window_manager_set", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "窗口管理器对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取最上面的主窗口。", - "name": "window_manager_get_top_main_window", - "return": { - "type": "widget_t*", - "desc": "返回窗口对象。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "窗口管理器对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取最上面的窗口。", - "name": "window_manager_get_top_window", - "return": { - "type": "widget_t*", - "desc": "返回窗口对象。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "窗口管理器对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取前一个的窗口。", - "name": "window_manager_get_prev_window", - "return": { - "type": "widget_t*", - "desc": "返回窗口对象。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "窗口管理器对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取指针当前的X坐标。", - "name": "window_manager_get_pointer_x", - "return": { - "type": "xy_t", - "desc": "返回指针当前的X坐标。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "窗口管理器对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取指针当前的Y坐标。", - "name": "window_manager_get_pointer_y", - "return": { - "type": "xy_t", - "desc": "返回指针当前的X坐标。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "窗口管理器对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取指针当前是否按下。", - "name": "window_manager_get_pointer_pressed", - "return": { - "type": "bool_t", - "desc": "返回指针当前是否按下。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "窗口管理器对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取当前窗口动画是否正在播放。", - "name": "window_manager_is_animating", - "return": { - "type": "bool_t", - "desc": "返回TRUE表示正在播放,FALSE表示没有播放。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "窗口管理器对象。" - }, - { - "type": "widget_t*", - "name": "window", - "desc": "窗口对象。" - } - ], - "annotation": {}, - "desc": "打开窗口。", - "name": "window_manager_open_window", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "窗口管理器对象。" - }, - { - "type": "widget_t*", - "name": "window", - "desc": "窗口对象。" - } - ], - "annotation": {}, - "desc": "强制立即关闭窗口。\n\n> 本函数不会执行窗口动画。", - "name": "window_manager_close_window_force", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "窗口管理器对象。" - } - ], - "annotation": {}, - "desc": "绘制。\n\n> 仅由主循环调用。", - "name": "window_manager_paint", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "窗口管理器对象。" - }, - { - "type": "event_t*", - "name": "e", - "desc": "事件对象。" - } - ], - "annotation": {}, - "desc": "分发输入事件。\n\n> 一般仅由主循环调用,特殊情况也可以用来注入事件。", - "name": "window_manager_dispatch_input_event", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "窗口管理器对象。" - }, - { - "type": "bool_t", - "name": "show_fps", - "desc": "是否显示FPS。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置是否显示FPS。", - "name": "window_manager_set_show_fps", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "窗口管理器对象。" - }, - { - "type": "uint32_t", - "name": "screen_saver_time", - "desc": "屏保时间(单位毫秒), 为0关闭屏保。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置屏保时间。", - "name": "window_manager_set_screen_saver_time", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "窗口管理器对象。" - }, - { - "type": "const char*", - "name": "cursor", - "desc": "图片名称(从图片管理器中加载)。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置鼠标指针。", - "name": "window_manager_set_cursor", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "窗口管理器对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "请求关闭顶层窗口。\n\n> 如果顶层窗口时模态对话框,用DIALOG\\_QUIT\\_NONE调用dialog\\_quit。", - "name": "window_manager_back", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "窗口管理器对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "回到主窗口,关闭之上的全部窗口。\n\n> 如果顶层窗口时模态对话框,用DIALOG\\_QUIT\\_NONE调用dialog\\_quit。", - "name": "window_manager_back_to_home", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "窗口管理器对象。" - }, - { - "type": "const char*", - "name": "target", - "desc": "目标窗口的名称。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "回到指定的窗口,关闭之上的全部窗口。\n\n> 如果顶层窗口时模态对话框,用DIALOG\\_QUIT\\_NONE调用dialog\\_quit。", - "name": "window_manager_back_to", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "窗口管理器对象。" - }, - { - "type": "widget_t*", - "name": "curr_win", - "desc": "当前窗口。" - }, - { - "type": "widget_t*", - "name": "target_win", - "desc": "目标窗口。" - }, - { - "type": "bool_t", - "name": "close", - "desc": "是否关闭当前窗口。" - } - ], - "annotation": {}, - "desc": "切换到指定窗口。", - "name": "window_manager_switch_to", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "窗口管理器对象。" - }, - { - "type": "event_t*", - "name": "e", - "desc": "事件。" - }, - { - "type": "void*", - "name": "handle", - "desc": "native window句柄。" - } - ], - "annotation": {}, - "desc": "处理native window事件。", - "name": "window_manager_dispatch_native_window_event", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "窗口管理器对象。" - }, - { - "type": "bool_t", - "name": "ignore_user_input", - "desc": "是否忽略用户输入。" - } - ], - "annotation": {}, - "desc": "开始等待鼠标指针。", - "name": "window_manager_begin_wait_pointer_cursor", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "窗口管理器对象。" - } - ], - "annotation": {}, - "desc": "结束等待鼠标指针。", - "name": "window_manager_end_wait_pointer_cursor", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "窗口管理器对象。" - }, - { - "type": "wh_t", - "name": "w", - "desc": "宽度" - }, - { - "type": "wh_t", - "name": "h", - "desc": "高度" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "调整原生窗口的大小。", - "name": "window_manager_resize", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "窗口管理器对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "关闭全部窗口。", - "name": "window_manager_close_all", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [ - { - "name": "global_emitter", - "desc": "全局事情分发器。", - "type": "emitter_t*", + "name": "value", + "desc": "值。", + "type": "value_t", "annotation": { "readable": true } } ], - "header": "base/window_manager.h", - "desc": "窗口管理器。", - "name": "window_manager_t", - "parent": "widget_t", + "header": "tkc/named_value.h", + "desc": "命名的值。", + "name": "named_value_t", "annotation": { "scriptable": true }, - "level": 2 + "level": 1 }, { "type": "class", "methods": [ { - "params": [ - { - "type": "compressor_options_t", - "name": "options", - "desc": "选项。" - } - ], + "params": [], "annotation": {}, - "desc": "创建compressor对象。", - "name": "compressor_miniz_create", + "desc": "创建mutex。", + "name": "tk_mutex_create", "return": { - "type": "compressor_t*", - "desc": "返回compressor对象。" - } - } - ], - "events": [], - "properties": [], - "header": "compressors/compressor_miniz.h", - "desc": "基于miniz实现的compressor接口。", - "name": "compressor_miniz_t", - "parent": "compressor_t", - "annotation": { - "fake": true - }, - "level": 2 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "widget_t*", - "name": "parent", - "desc": "父控件" - }, - { - "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": { - "constructor": true, - "scriptable": true - }, - "desc": "创建canvas_widget对象", - "name": "canvas_widget_create", - "return": { - "type": "widget_t*", - "desc": "对象。" + "type": "tk_mutex_t*", + "desc": "mutex对象。" } }, { "params": [ { - "type": "widget_t*", - "name": "widget", - "desc": "canvas_widget对象。" + "type": "tk_mutex_t*", + "name": "mutex", + "desc": "mutex对象。" } ], - "annotation": { - "cast": true, - "scriptable": true - }, - "desc": "转换为canvas_widget对象(供脚本语言使用)。", - "name": "canvas_widget_cast", + "annotation": {}, + "desc": "加锁。", + "name": "tk_mutex_lock", "return": { - "type": "widget_t*", - "desc": "canvas_widget对象。" + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "tk_mutex_t*", + "name": "mutex", + "desc": "mutex对象。" + } + ], + "annotation": {}, + "desc": "尝试加锁。", + "name": "tk_mutex_try_lock", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "tk_mutex_t*", + "name": "mutex", + "desc": "mutex对象。" + } + ], + "annotation": {}, + "desc": "解锁。", + "name": "tk_mutex_unlock", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "tk_mutex_t*", + "name": "mutex", + "desc": "mutex对象。" + } + ], + "annotation": {}, + "desc": "销毁mutex对象。", + "name": "tk_mutex_destroy", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" } } ], "events": [], "properties": [], - "header": "canvas_widget/canvas_widget.h", - "desc": "画布控件。\n\n画布控件让开发者可以自己在控件上绘制需要的内容。\n\ncanvas\\_widget\\_t是[widget\\_t](widget_t.md)的子类控件,widget\\_t的函数均适用于canvas\\_widget\\_t控件。\n\n在xml中使用\"canvas\"标签创建画布控件。如:\n\n```xml\n\n```\n\n> 更多用法请参考:\n[canvas_widget.xml](https://github.com/zlgopen/awtk/blob/master/design/default/ui/vgcanvas.xml)\n\n在c代码中使用函数canvas\\_widget\\_create创建画布控件。如:\n\n```c\nwidget_t* canvas = canvas_widget_create(win, 0, 0, win->w, win->h);\n```\n\n> 创建之后,需要用widget\\_on注册EVT\\_PAINT事件,并在EVT\\_PAINT事件处理函数中绘制。\n\n```c\nwidget_on(canvas, EVT_PAINT, on_paint_event, canvas);\n```\n\n绘制时,可以通过canvas接口去绘制,也可以通过vgcanvas接口去绘制。\n先从evt获取canvas对象,再通过canvas\\_get\\_vgcanvas从canvas中获取vgcanvas对象。\n\n```c\n\nstatic ret_t on_paint_event(void* ctx, event_t* evt) {\nwidget_t* canvas_widget = WIDGET(ctx);\ncanvas_t* c = paint_event_cast(evt)->c;\nvgcanvas_t* vg = canvas_get_vgcanvas(c);\ncolor_t bg = color_init(0xe0, 0xe0, 0xe0, 0xff);\ncolor_t tc = color_init(0, 0, 0, 0xff);\nrect_t r = rect_init(canvas_widget->x, canvas_widget->y, canvas_widget->w, canvas_widget->h);\n\nvgcanvas_save(vg);\nvgcanvas_clip_rect(vg, r.x, r.y, r.w, r.h);\nvgcanvas_translate(vg, r.x, r.y);\n\n...\n\nvgcanvas_restore(vg);\n\nreturn RET_OK;\n}\n```\n\n> 完整示例请参考:\n[canvas demo](https://github.com/zlgopen/awtk-c-demos/blob/master/demos/canvas.c)\n\n参考:\n\n* [canvas接口描述](canvas_t.md)\n* [vgcanvas接口描述](vgcanvas_t.md)", - "name": "canvas_widget_t", - "parent": "widget_t", - "annotation": { - "scriptable": true, - "design": true, - "widget": true - }, - "level": 2 + "header": "tkc/mutex.h", + "desc": "互斥锁。", + "name": "tk_mutex_t", + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [], + "annotation": {}, + "desc": "创建嵌套互斥锁。", + "name": "tk_mutex_nest_create", + "return": { + "type": "tk_mutex_nest_t*", + "desc": "mutex_nest对象。" + } + }, + { + "params": [ + { + "type": "tk_mutex_nest_t*", + "name": "mutex_nest", + "desc": "mutex_nest对象。" + } + ], + "annotation": {}, + "desc": "加锁。", + "name": "tk_mutex_nest_lock", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "tk_mutex_nest_t*", + "name": "mutex_nest", + "desc": "mutex_nest对象。" + } + ], + "annotation": {}, + "desc": "尝试加锁。", + "name": "tk_mutex_nest_try_lock", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "tk_mutex_nest_t*", + "name": "mutex_nest", + "desc": "mutex_nest对象。" + } + ], + "annotation": {}, + "desc": "解锁。只允许解锁当前线程所加的锁。", + "name": "tk_mutex_nest_unlock", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "tk_mutex_nest_t*", + "name": "mutex_nest", + "desc": "mutex_nest对象。" + } + ], + "annotation": {}, + "desc": "销毁mutex_nest对象。", + "name": "tk_mutex_nest_destroy", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + } + ], + "events": [], + "properties": [], + "header": "tkc/mutex_nest.h", + "desc": "嵌套互斥锁。允许同一个线程多次加锁。", + "name": "tk_mutex_nest_t", + "level": 1 }, { "type": "class", @@ -44819,173 +32743,498 @@ { "params": [ { - "type": "widget_t*", - "name": "parent", - "desc": "父控件" + "type": "mmap_t*", + "name": "mmap", + "desc": "mmap对象。" }, { - "type": "xy_t", - "name": "x", - "desc": "x坐标" + "type": "const char*", + "name": "filename", + "desc": "文件名。" }, { - "type": "xy_t", - "name": "y", - "desc": "y坐标" + "type": "bool_t", + "name": "writable", + "desc": "是否可写。" }, { - "type": "wh_t", - "name": "w", - "desc": "宽度" - }, - { - "type": "wh_t", - "name": "h", - "desc": "高度" + "type": "bool_t", + "name": "shared", + "desc": "是否共享。" } ], "annotation": { "constructor": true }, - "desc": "创建color_component对象", - "name": "color_component_create", + "desc": "初始化mmap对象。", + "name": "mmap_create", "return": { - "type": "widget_t*", - "desc": "对象。" + "type": "mmap_t*", + "desc": "mmap对象本身。" } }, { "params": [ { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "color_t", - "name": "c", - "desc": "颜色。" + "type": "mmap_t*", + "name": "mmap", + "desc": "mmap对象。" } ], "annotation": {}, - "desc": "设置颜色。", - "name": "color_component_set_color", + "desc": "销毁mmap。", + "name": "mmap_destroy", "return": { "type": "ret_t", "desc": "返回RET_OK表示成功,否则表示失败。" } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "float", - "name": "h", - "desc": "色调。" - }, - { - "type": "float", - "name": "s", - "desc": "饱和度。" - }, - { - "type": "float", - "name": "v", - "desc": "明度。" - } - ], - "annotation": {}, - "desc": "设置颜色。", - "name": "color_component_set_hsv", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "color_component对象。" - } - ], - "annotation": {}, - "desc": "获取h分量。", - "name": "color_component_get_h", - "return": { - "type": "float", - "desc": "返回h分量。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "color_component对象。" - } - ], - "annotation": {}, - "desc": "获取s分量。", - "name": "color_component_get_s", - "return": { - "type": "float", - "desc": "返回s分量。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "color_component对象。" - } - ], - "annotation": {}, - "desc": "获取v分量。", - "name": "color_component_get_v", - "return": { - "type": "float", - "desc": "返回v分量。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "color_component对象。" - } - ], - "annotation": { - "cast": true, - "scriptable": true - }, - "desc": "转换为color_component对象(供脚本语言使用)。", - "name": "color_component_cast", - "return": { - "type": "widget_t*", - "desc": "color_component对象。" - } } ], "events": [], - "properties": [], - "header": "color_picker/color_component.h", - "desc": "颜色选择器的颜色分量。\n控件的名称有严格规定:\nCOLOR_PICKER_CHILD_SV: 水平为Value/Brightness(递增),垂直为Saturation(递减)。\nCOLOR_PICKER_CHILD_H: 水平为同色,垂直为Hue(递减)。", - "name": "color_component_t", - "parent": "widget_t", + "properties": [ + { + "name": "data", + "desc": "内存地址。", + "type": "void*", + "annotation": { + "readable": true + } + }, + { + "name": "size", + "desc": "数据长度。", + "type": "uint32_t", + "annotation": { + "readable": true + } + } + ], + "header": "tkc/mmap.h", + "desc": "把文件内容映射到内存。", + "name": "mmap_t", + "level": 1 + }, + { + "type": "enum", + "desc": "MIME_TYPE。", + "consts": [ + { + "desc": "\"application/envoy\"。", + "name": "MIME_TYPE_APPLICATION_ENVOY" + }, + { + "desc": "\"application/fractals\"。", + "name": "MIME_TYPE_APPLICATION_FRACTALS" + }, + { + "desc": "\"application/futuresplash\"。", + "name": "MIME_TYPE_APPLICATION_FUTURESPLASH" + }, + { + "desc": "\"application/hta\"。", + "name": "MIME_TYPE_APPLICATION_HTA" + }, + { + "desc": "\"application/json\"。", + "name": "MIME_TYPE_APPLICATION_JSON" + }, + { + "desc": "\"application/ubjson\"。", + "name": "MIME_TYPE_APPLICATION_UBJSON" + }, + { + "desc": "\"application/mac-binhex40\"。", + "name": "MIME_TYPE_APPLICATION_MAC_BINHEX40" + }, + { + "desc": "\"application/msword\"。", + "name": "MIME_TYPE_APPLICATION_MSWORD" + }, + { + "desc": "\"application/octet-stream\"。", + "name": "MIME_TYPE_APPLICATION_OCTET_STREAM" + }, + { + "desc": "\"application/oda\"。", + "name": "MIME_TYPE_APPLICATION_ODA" + }, + { + "desc": "\"application/olescript\"。", + "name": "MIME_TYPE_APPLICATION_OLESCRIPT" + }, + { + "desc": "\"application/pdf\"。", + "name": "MIME_TYPE_APPLICATION_PDF" + }, + { + "desc": "\"application/pics-rules\"。", + "name": "MIME_TYPE_APPLICATION_PICS_RULES" + }, + { + "desc": "\"application/pkcs10\"。", + "name": "MIME_TYPE_APPLICATION_PKCS10" + }, + { + "desc": "\"application/pkix-crl\"。", + "name": "MIME_TYPE_APPLICATION_PKIX_CRL" + }, + { + "desc": "\"application/postscript\"。", + "name": "MIME_TYPE_APPLICATION_POSTSCRIPT" + }, + { + "desc": "\"application/rtf\"。", + "name": "MIME_TYPE_APPLICATION_RTF" + }, + { + "desc": "\"application/vnd.ms-excel\"。", + "name": "MIME_TYPE_APPLICATION_VND_MS_EXCEL" + }, + { + "desc": "\"application/vnd.ms-outlook\"。", + "name": "MIME_TYPE_APPLICATION_VND_MS_OUTLOOK" + }, + { + "desc": "\"application/vnd.ms-pkicertstore\"。", + "name": "MIME_TYPE_APPLICATION_VND_MS_PKICERTSTORE" + }, + { + "desc": "\"application/vnd.ms-pkiseccat\"。", + "name": "MIME_TYPE_APPLICATION_VND_MS_PKISECCAT" + }, + { + "desc": "\"application/vnd.ms-pkistl\"。", + "name": "MIME_TYPE_APPLICATION_VND_MS_PKISTL" + }, + { + "desc": "\"application/vnd.ms-powerpoint\"。", + "name": "MIME_TYPE_APPLICATION_VND_MS_POWERPOINT" + }, + { + "desc": "\"application/vnd.ms-project\"。", + "name": "MIME_TYPE_APPLICATION_VND_MS_PROJECT" + }, + { + "desc": "\"application/vnd.ms-works\"。", + "name": "MIME_TYPE_APPLICATION_VND_MS_WORKS" + }, + { + "desc": "\"application/winhlp\"。", + "name": "MIME_TYPE_APPLICATION_WINHLP" + }, + { + "desc": "\"application/x-bcpio\"。", + "name": "MIME_TYPE_APPLICATION_X_BCPIO" + }, + { + "desc": "\"application/x-cdf\"。", + "name": "MIME_TYPE_APPLICATION_X_CDF" + }, + { + "desc": "\"application/x-compress\"。", + "name": "MIME_TYPE_APPLICATION_X_COMPRESS" + }, + { + "desc": "\"application/x-compressed\"。", + "name": "MIME_TYPE_APPLICATION_X_COMPRESSED" + }, + { + "desc": "\"application/x-cpio\"。", + "name": "MIME_TYPE_APPLICATION_X_CPIO" + }, + { + "desc": "\"application/x-csh\"。", + "name": "MIME_TYPE_APPLICATION_X_CSH" + }, + { + "desc": "\"application/x-director\"。", + "name": "MIME_TYPE_APPLICATION_X_DIRECTOR" + }, + { + "desc": "\"application/x-dvi\"。", + "name": "MIME_TYPE_APPLICATION_X_DVI" + }, + { + "desc": "\"application/x-gtar\"。", + "name": "MIME_TYPE_APPLICATION_X_GTAR" + }, + { + "desc": "\"application/x-gzip\"。", + "name": "MIME_TYPE_APPLICATION_X_GZIP" + }, + { + "desc": "\"application/x-hdf\"。", + "name": "MIME_TYPE_APPLICATION_X_HDF" + }, + { + "desc": "\"application/x-iphone\"。", + "name": "MIME_TYPE_APPLICATION_X_IPHONE" + }, + { + "desc": "\"application/x-javascript\"。", + "name": "MIME_TYPE_APPLICATION_X_JAVASCRIPT" + }, + { + "desc": "\"application/x-latex\"。", + "name": "MIME_TYPE_APPLICATION_X_LATEX" + }, + { + "desc": "\"application/x-msaccess\"。", + "name": "MIME_TYPE_APPLICATION_X_MSACCESS" + }, + { + "desc": "\"application/x-mscardfile\"。", + "name": "MIME_TYPE_APPLICATION_X_MSCARDFILE" + }, + { + "desc": "\"application/x-msclip\"。", + "name": "MIME_TYPE_APPLICATION_X_MSCLIP" + }, + { + "desc": "\"application/x-msdownload\"。", + "name": "MIME_TYPE_APPLICATION_X_MSDOWNLOAD" + }, + { + "desc": "\"application/x-msmediaview\"。", + "name": "MIME_TYPE_APPLICATION_X_MSMEDIAVIEW" + }, + { + "desc": "\"application/x-msmetafile\"。", + "name": "MIME_TYPE_APPLICATION_X_MSMETAFILE" + }, + { + "desc": "\"application/x-msmoney\"。", + "name": "MIME_TYPE_APPLICATION_X_MSMONEY" + }, + { + "desc": "\"application/x-mspublisher\"。", + "name": "MIME_TYPE_APPLICATION_X_MSPUBLISHER" + }, + { + "desc": "\"application/x-msschedule\"。", + "name": "MIME_TYPE_APPLICATION_X_MSSCHEDULE" + }, + { + "desc": "\"application/x-msterminal\"。", + "name": "MIME_TYPE_APPLICATION_X_MSTERMINAL" + }, + { + "desc": "\"application/x-mswrite\"。", + "name": "MIME_TYPE_APPLICATION_X_MSWRITE" + }, + { + "desc": "\"application/x-netcdf\"。", + "name": "MIME_TYPE_APPLICATION_X_NETCDF" + }, + { + "desc": "\"application/x-perfmon\"。", + "name": "MIME_TYPE_APPLICATION_X_PERFMON" + }, + { + "desc": "\"application/x-pkcs12\"。", + "name": "MIME_TYPE_APPLICATION_X_PKCS12" + }, + { + "desc": "\"application/x-sh\"。", + "name": "MIME_TYPE_APPLICATION_X_SH" + }, + { + "desc": "\"application/x-shar\"。", + "name": "MIME_TYPE_APPLICATION_X_SHAR" + }, + { + "desc": "\"application/x-shockwave-flash\"。", + "name": "MIME_TYPE_APPLICATION_X_SHOCKWAVE_FLASH" + }, + { + "desc": "\"application/x-stuffit\"。", + "name": "MIME_TYPE_APPLICATION_X_STUFFIT" + }, + { + "desc": "\"application/x-sv4cpio\"。", + "name": "MIME_TYPE_APPLICATION_X_SV4CPIO" + }, + { + "desc": "\"application/x-sv4crc\"。", + "name": "MIME_TYPE_APPLICATION_X_SV4CRC" + }, + { + "desc": "\"application/x-tar\"。", + "name": "MIME_TYPE_APPLICATION_X_TAR" + }, + { + "desc": "\"application/x-tcl\"。", + "name": "MIME_TYPE_APPLICATION_X_TCL" + }, + { + "desc": "\"application/x-tex\"。", + "name": "MIME_TYPE_APPLICATION_X_TEX" + }, + { + "desc": "\"application/x-texinfo\"。", + "name": "MIME_TYPE_APPLICATION_X_TEXINFO" + }, + { + "desc": "\"application/x-troff\"。", + "name": "MIME_TYPE_APPLICATION_X_TROFF" + }, + { + "desc": "\"application/x-ustar\"。", + "name": "MIME_TYPE_APPLICATION_X_USTAR" + }, + { + "desc": "\"application/zip\"。", + "name": "MIME_TYPE_APPLICATION_ZIP" + }, + { + "desc": "\"audio/basic\"。", + "name": "MIME_TYPE_AUDIO_BASIC" + }, + { + "desc": "\"audio/mid\"。", + "name": "MIME_TYPE_AUDIO_MID" + }, + { + "desc": "\"audio/mpeg\"。", + "name": "MIME_TYPE_AUDIO_MPEG" + }, + { + "desc": "\"audio/x-aiff\"。", + "name": "MIME_TYPE_AUDIO_X_AIFF" + }, + { + "desc": "\"audio/x-mpegurl\"。", + "name": "MIME_TYPE_AUDIO_X_MPEGURL" + }, + { + "desc": "\"audio/x-wav\"。", + "name": "MIME_TYPE_AUDIO_X_WAV" + }, + { + "desc": "\"image/bmp\"。", + "name": "MIME_TYPE_IMAGE_BMP" + }, + { + "desc": "\"image/cis-cod\"。", + "name": "MIME_TYPE_IMAGE_CIS_COD" + }, + { + "desc": "\"image/gif\"。", + "name": "MIME_TYPE_IMAGE_GIF" + }, + { + "desc": "\"image/ief\"。", + "name": "MIME_TYPE_IMAGE_IEF" + }, + { + "desc": "\"image/jpeg\"。", + "name": "MIME_TYPE_IMAGE_JPEG" + }, + { + "desc": "\"image/pipeg\"。", + "name": "MIME_TYPE_IMAGE_PIPEG" + }, + { + "desc": "\"image/svg+xml\"。", + "name": "MIME_TYPE_IMAGE_SVG_XML" + }, + { + "desc": "\"image/tiff\"。", + "name": "MIME_TYPE_IMAGE_TIFF" + }, + { + "desc": "\"image/x-cmx\"。", + "name": "MIME_TYPE_IMAGE_X_CMX" + }, + { + "desc": "\"image/x-icon\"。", + "name": "MIME_TYPE_IMAGE_X_ICON" + }, + { + "desc": "\"image/x-rgb\"。", + "name": "MIME_TYPE_IMAGE_X_RGB" + }, + { + "desc": "\"image/x-xbitmap\"。", + "name": "MIME_TYPE_IMAGE_X_XBITMAP" + }, + { + "desc": "\"image/x-xpixmap\"。", + "name": "MIME_TYPE_IMAGE_X_XPIXMAP" + }, + { + "desc": "\"image/x-xwindowdump\"。", + "name": "MIME_TYPE_IMAGE_X_XWINDOWDUMP" + }, + { + "desc": "\"message/rfc822\"。", + "name": "MIME_TYPE_MESSAGE_RFC822" + }, + { + "desc": "\"text/css\"。", + "name": "MIME_TYPE_TEXT_CSS" + }, + { + "desc": "\"text/h323\"。", + "name": "MIME_TYPE_TEXT_H323" + }, + { + "desc": "\"text/html\"。", + "name": "MIME_TYPE_TEXT_HTML" + }, + { + "desc": "\"text/iuls\"。", + "name": "MIME_TYPE_TEXT_IULS" + }, + { + "desc": "\"text/plain\"。", + "name": "MIME_TYPE_TEXT_PLAIN" + }, + { + "desc": "\"text/richtext\"。", + "name": "MIME_TYPE_TEXT_RICHTEXT" + }, + { + "desc": "\"text/scriptlet\"。", + "name": "MIME_TYPE_TEXT_SCRIPTLET" + }, + { + "desc": "\"text/webviewhtml\"。", + "name": "MIME_TYPE_TEXT_WEBVIEWHTML" + }, + { + "desc": "\"text/x-component\"。", + "name": "MIME_TYPE_TEXT_X_COMPONENT" + }, + { + "desc": "\"text/x-setext\"。", + "name": "MIME_TYPE_TEXT_X_SETEXT" + }, + { + "desc": "\"text/x-vcard\"。", + "name": "MIME_TYPE_TEXT_X_VCARD" + }, + { + "desc": "\"video/mpeg\"。", + "name": "MIME_TYPE_VIDEO_MPEG" + }, + { + "desc": "\"video/quicktime\"。", + "name": "MIME_TYPE_VIDEO_QUICKTIME" + }, + { + "desc": "\"video/x-msvideo\"。", + "name": "MIME_TYPE_VIDEO_X_MSVIDEO" + } + ], + "header": "tkc/mime_types.h", + "name": "MIME_TYPE", + "prefix": "MIME_TYPE_", "annotation": { "scriptable": true, - "design": true, - "widget": true + "string": true }, - "level": 2 + "level": 1 }, { "type": "class", @@ -44993,48 +33242,3001 @@ { "params": [ { - "type": "widget_t*", - "name": "parent", - "desc": "父控件" - }, - { - "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": "高度" + "type": "uint32_t", + "name": "size", + "desc": "内存大小。" } ], "annotation": { - "constructor": true, - "scriptable": true + "macro": true }, - "desc": "创建color_picker对象", - "name": "color_picker_create", + "desc": "分配一块内存。", + "name": "TKMEM_ALLOC", + "export": "tk_alloc", "return": { - "type": "widget_t*", - "desc": "对象。" + "type": "void*", + "desc": "成功返回内存块首地址,失败返回NULL。" } }, { "params": [ { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" + "type": "uint32_t", + "name": "nmemb", + "desc": "内存块数量。" + }, + { + "type": "uint32_t", + "name": "size", + "desc": "每一块的大小。" + } + ], + "annotation": { + "macro": true + }, + "desc": "分配一块内存,并将内容清零。", + "name": "TKMEM_CALLOC", + "export": "tk_calloc", + "return": { + "type": "void*", + "desc": "成功返回内存块首地址,失败返回NULL。" + } + }, + { + "params": [ + { + "type": "void*", + "name": "p", + "desc": "原来的内存地址。" + }, + { + "type": "uint32_t", + "name": "size", + "desc": "每一块的大小。" + } + ], + "annotation": { + "macro": true + }, + "desc": "重新分配一块内存,如果原来的内存块大于等于需要的空间,直接返回原来的内存块。", + "name": "TKMEM_REALLOC", + "export": "tk_realloc", + "return": { + "type": "void*", + "desc": "成功返回内存块首地址,失败返回NULL。" + } + }, + { + "params": [ + { + "type": "void*", + "name": "p", + "desc": "内存地址。" + } + ], + "annotation": { + "macro": true + }, + "desc": "释放内存。", + "name": "TKMEM_FREE", + "export": "tk_free", + "return": { + "type": "void", + "desc": "无。" + } + }, + { + "params": [], + "annotation": {}, + "desc": "显示内存信息。", + "name": "tk_mem_dump", + "return": { + "type": "void", + "desc": "返回void。" + } + }, + { + "params": [ + { + "type": "void*", + "name": "buffer", + "desc": "内存地址。" + }, + { + "type": "uint32_t", + "name": "size", + "desc": "内存长度。" + } + ], + "annotation": {}, + "desc": "初始化内存。", + "name": "tk_mem_init", + "export": "none", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [], + "annotation": {}, + "desc": "初始化互斥和oom。", + "name": "tk_mem_init_stage2", + "export": "none", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [], + "annotation": {}, + "desc": "检查给定的地址是否是一个有效的heap地址。\n\n> 用于辅助发现内存问题。", + "name": "tk_mem_is_valid_addr", + "return": { + "type": "bool_t", + "desc": "返回FALSE一定是无效地址,返回TRUE在PC则不太确定。" + } + } + ], + "events": [], + "properties": [], + "header": "tkc/mem.h", + "desc": "内存管理相关的宏和函数。\n\n示例:\n\n```c\nchar* str = (char*)TKMEM_ALLOC(100);\n...\nTKMEM_FREE(str);\n```\n\n```c\nchar* str = (char*)TKMEM_ALLOC(100);\n...\nstr = (char*)TKMEM_REALLOC(str, 128);\n...\nTKMEM_FREE(str);\n```", + "name": "tk_mem_t", + "annotation": { + "fake": true + }, + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "type": "mem_allocator_t*", + "name": "allocator", + "desc": "allocator对象。" + }, + { + "type": "uint32_t", + "name": "size", + "desc": "内存的大小。" + }, + { + "type": "const char*", + "name": "", + "desc": "。" + }, + { + "type": "uint32_t", + "name": "line", + "desc": "分配内存的行数(用于调试)。" + } + ], + "annotation": {}, + "desc": "分配指定大小的内存。", + "name": "mem_allocator_alloc", + "export": "none", + "return": { + "type": "void*", + "desc": "成功返回内存块的地址,失败返回NULL。" + } + }, + { + "params": [ + { + "type": "mem_allocator_t*", + "name": "allocator", + "desc": "allocator对象。" + }, + { + "type": "void*", + "name": "ptr", + "desc": "原来内存的地址。" + }, + { + "type": "uint32_t", + "name": "size", + "desc": "内存的大小。" + }, + { + "type": "const char*", + "name": "", + "desc": "。" + }, + { + "type": "uint32_t", + "name": "line", + "desc": "分配内存的行数(用于调试)。" + } + ], + "annotation": {}, + "desc": "重新分配指定大小的内存。", + "name": "mem_allocator_realloc", + "export": "none", + "return": { + "type": "void*", + "desc": "成功返回内存块的地址,失败返回NULL。" + } + }, + { + "params": [ + { + "type": "mem_allocator_t*", + "name": "allocator", + "desc": "allocator对象。" + }, + { + "type": "void*", + "name": "ptr", + "desc": "内存的地址。" + } + ], + "annotation": {}, + "desc": "释放内存。", + "name": "mem_allocator_free", + "export": "none", + "return": { + "type": "void*", + "desc": "成功返回内存块的地址,失败返回NULL。" + } + }, + { + "params": [ + { + "type": "mem_allocator_t*", + "name": "allocator", + "desc": "allocator对象。" + } + ], + "annotation": {}, + "desc": "显示内存信息,用于调试。", + "name": "mem_allocator_dump", + "export": "none", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "mem_allocator_t*", + "name": "allocator", + "desc": "allocator对象。" + } + ], + "annotation": {}, + "desc": "销毁内存分配器。", + "name": "mem_allocator_destroy", + "export": "none", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + } + ], + "events": [], + "properties": [], + "header": "tkc/mem_allocator.h", + "desc": "内存分配接口。", + "name": "mem_allocator_t", + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "type": "matrix_t*", + "name": "m", + "desc": "矩阵对象。" + } + ], + "annotation": {}, + "desc": "初始化矩阵对象。", + "name": "matrix_init", + "return": { + "type": "matrix_t*", + "desc": "矩阵对象。" + } + }, + { + "params": [ + { + "type": "matrix_t*", + "name": "m", + "desc": "矩阵对象。" + } + ], + "annotation": {}, + "desc": "重置矩阵对象为单位矩阵。", + "name": "matrix_identity", + "return": { + "type": "matrix_t*", + "desc": "矩阵对象。" + } + }, + { + "params": [ + { + "type": "matrix_t*", + "name": "m", + "desc": "矩阵对象。" + } + ], + "annotation": {}, + "desc": "求矩阵的逆。", + "name": "matrix_invert", + "return": { + "type": "matrix_t*", + "desc": "矩阵对象。" + } + }, + { + "params": [ + { + "type": "matrix_t*", + "name": "m", + "desc": "矩阵对象。" + }, + { + "type": "float", + "name": "a0", + "desc": "a0" + }, + { + "type": "float", + "name": "a1", + "desc": "a1" + }, + { + "type": "float", + "name": "a2", + "desc": "a2" + }, + { + "type": "float", + "name": "a3", + "desc": "a3" + }, + { + "type": "float", + "name": "a4", + "desc": "a4" + }, + { + "type": "float", + "name": "a5", + "desc": "a5" + } + ], + "annotation": {}, + "desc": "设置矩阵的参数。", + "name": "matrix_set", + "return": { + "type": "matrix_t*", + "desc": "矩阵对象。" + } + }, + { + "params": [ + { + "type": "matrix_t*", + "name": "m", + "desc": "矩阵对象。" + }, + { + "type": "matrix_t*", + "name": "b", + "desc": "矩阵对象。" + } + ], + "annotation": {}, + "desc": "矩阵相乘。", + "name": "matrix_multiply", + "return": { + "type": "matrix_t*", + "desc": "矩阵对象。" + } + }, + { + "params": [ + { + "type": "matrix_t*", + "name": "m", + "desc": "矩阵对象。" + }, + { + "type": "float", + "name": "x", + "desc": "x" + }, + { + "type": "float", + "name": "y", + "desc": "y" + } + ], + "annotation": {}, + "desc": "平移。", + "name": "matrix_translate", + "return": { + "type": "matrix_t*", + "desc": "矩阵对象。" + } + }, + { + "params": [ + { + "type": "matrix_t*", + "name": "m", + "desc": "矩阵对象。" + }, + { + "type": "float", + "name": "sx", + "desc": "sx" + }, + { + "type": "float", + "name": "sy", + "desc": "sy" + } + ], + "annotation": {}, + "desc": "缩放。", + "name": "matrix_scale", + "return": { + "type": "matrix_t*", + "desc": "矩阵对象。" + } + }, + { + "params": [ + { + "type": "matrix_t*", + "name": "m", + "desc": "矩阵对象。" + }, + { + "type": "float", + "name": "rad", + "desc": "角度。" + } + ], + "annotation": {}, + "desc": "旋转。", + "name": "matrix_rotate", + "return": { + "type": "matrix_t*", + "desc": "矩阵对象。" + } + }, + { + "params": [ + { + "type": "matrix_t*", + "name": "m", + "desc": "矩阵对象。" + }, + { + "type": "xy_t", + "name": "x", + "desc": "x" + }, + { + "type": "xy_t", + "name": "y", + "desc": "y" + }, + { + "type": "xy_t*", + "name": "out_x", + "desc": "out_x" + }, + { + "type": "xy_t*", + "name": "out_y", + "desc": "out_y" + } + ], + "annotation": {}, + "desc": "对点进行变换。", + "name": "matrix_transform_point", + "return": { + "type": "matrix_t*", + "desc": "矩阵对象。" + } + } + ], + "events": [], + "properties": [], + "header": "tkc/matrix.h", + "desc": "2D矩阵对象。", + "name": "matrix_t", + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [], + "annotation": {}, + "desc": "获取log的级别。", + "name": "log_get_log_level", + "return": { + "type": "log_level_t", + "desc": "返回log的级别。" + } + }, + { + "params": [ + { + "type": "log_level_t", + "name": "log_level", + "desc": "log的级别。" + } + ], + "annotation": {}, + "desc": "设置log的级别。", + "name": "log_set_log_level", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "const char*", + "name": "format", + "desc": "格式或信息。" + } + ], + "annotation": {}, + "desc": "输出调试信息。\n> 变参函数。\n\n```\nlog_debug(\"debug message\\n\");\n```", + "name": "log_debug", + "export": "none", + "return": { + "type": "void", + "desc": "无返回值。" + } + }, + { + "params": [ + { + "type": "const char*", + "name": "format", + "desc": "格式或信息。" + } + ], + "annotation": {}, + "desc": "输出参考信息。\n> 变参函数。\n\n```\nlog_info(\"info message\\n\");\n```", + "name": "log_info", + "export": "none", + "return": { + "type": "void", + "desc": "无返回值。" + } + }, + { + "params": [ + { + "type": "const char*", + "name": "format", + "desc": "格式或信息。" + } + ], + "annotation": {}, + "desc": "输出警告信息。\n> 变参函数。\n\n```\nlog_warn(\"warn message\\n\");\n```", + "name": "log_warn", + "export": "none", + "return": { + "type": "void", + "desc": "无返回值。" + } + }, + { + "params": [ + { + "type": "const char*", + "name": "format", + "desc": "格式或信息。" + } + ], + "annotation": {}, + "desc": "输出错误信息。\n> 变参函数。\n\n```\nlog_error(\"error message\\n\");\n```", + "name": "log_error", + "export": "none", + "return": { + "type": "void", + "desc": "无返回值。" + } + } + ], + "events": [], + "properties": [], + "header": "tkc/log.h", + "desc": "log。", + "name": "log_t", + "annotation": { + "fake": true + }, + "level": 1 + }, + { + "type": "enum", + "desc": "LOG的级别。", + "consts": [ + { + "desc": "DEBUG", + "name": "LOG_LEVEL_DEBUG" + }, + { + "desc": "INFO", + "name": "LOG_LEVEL_INFO" + }, + { + "desc": "WARN", + "name": "LOG_LEVEL_WARN" + }, + { + "desc": "ERROR", + "name": "LOG_LEVEL_ERROR" + } + ], + "header": "tkc/log.h", + "name": "log_level_t", + "prefix": "LOG_LEVEL_", + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "type": "const int_str_t*", + "name": "items", + "desc": "int_str_t数组。" + }, + { + "type": "int32_t", + "name": "name", + "desc": "name。" + } + ], + "annotation": {}, + "desc": "根据name获取对应的value。", + "name": "int_str_value", + "return": { + "type": "const char*", + "desc": "返回value。" + } + }, + { + "params": [ + { + "type": "const int_str_t*", + "name": "items", + "desc": "int_str_t数组。" + }, + { + "type": "const char*", + "name": "value", + "desc": "value。" + }, + { + "type": "int32_t", + "name": "defval", + "desc": "如果没有找到对应的name,则返回的defval默认值。" + } + ], + "annotation": {}, + "desc": "根据value获取对应的name。", + "name": "int_str_name", + "return": { + "type": "int32_t", + "desc": "返回name。" + } + } + ], + "events": [], + "properties": [], + "header": "tkc/int_str.h", + "desc": "数字-字符串类型。\n\n负责把一个数字映射成一个字符串。\n\n示例:\n\n```c\nstatic const int_str_t color_values[] = {{1, \"red\"}, {2, \"black\"}, {3, \"blue\"}, {4, \"white\"}};\nconst char* value = int_str_value(color_values, 3);\nint32_t name = int_str_name(color_values, \"blue\", 0);\nprintf(\"value = %s \\n\", value);\nprintf(\"name = %d \\n\", name);\n```", + "name": "int_str_t", + "annotation": { + "fake": true + }, + "level": 1 + }, + { + "type": "enum", + "desc": "指示器默认绘制的类型。", + "consts": [ + { + "desc": "自动选择。", + "name": "INDICATOR_DEFAULT_PAINT_AUTO" + }, + { + "desc": "实心圆点指示器,当前项填充selected_fg_color,其他填充fg_color。", + "name": "INDICATOR_DEFAULT_PAINT_FILL_DOT" + }, + { + "desc": "镂空圆点指示器,当前项填充selected_fg_color,其他镂空fg_color。", + "name": "INDICATOR_DEFAULT_PAINT_STROKE_DOT" + }, + { + "desc": "实心矩形指示器,当前项填充selected_fg_color,其他填充fg_color。", + "name": "INDICATOR_DEFAULT_PAINT_FILL_RECT" + }, + { + "desc": "镂空矩形指示器,当前项填充selected_fg_color,其他镂空fg_color。", + "name": "INDICATOR_DEFAULT_PAINT_STROKE_RECT" + } + ], + "header": "slide_view/slide_indicator.h", + "name": "indicator_default_paint_t", + "prefix": "INDICATOR_DEFAULT_PAINT_", + "annotation": { + "scriptable": true + }, + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [], + "annotation": { + "constructor": true + }, + "desc": "获取缺省的idle_manager_t管理器。", + "name": "idle_manager", + "return": { + "type": "idle_manager_t*", + "desc": "返回idle_manager_t管理器对象。" + } + }, + { + "params": [ + { + "type": "idle_manager_t*", + "name": "idle_manager_t", + "desc": "idle_manager_t管理器对象。" + } + ], + "annotation": {}, + "desc": "设置缺省的idle_manager_t管理器。", + "name": "idle_manager_set", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [], + "annotation": { + "constructor": true + }, + "desc": "创建idle_manager_t管理器。", + "name": "idle_manager_create", + "return": { + "type": "idle_manager_t*", + "desc": "返回idle_manager_t管理器对象。" + } + }, + { + "params": [ + { + "type": "idle_manager_t*", + "name": "idle_manager", + "desc": "idle_manager_t管理器对象。" + } + ], + "annotation": { + "constructor": true + }, + "desc": "初始化idle_manager_t管理器。", + "name": "idle_manager_init", + "return": { + "type": "idle_manager_t*", + "desc": "返回idle_manager_t管理器对象。" + } + }, + { + "params": [ + { + "type": "idle_manager_t*", + "name": "idle_manager", + "desc": "idle_manager_t管理器对象。" + } + ], + "annotation": {}, + "desc": "析构idle_manager_t管理器。", + "name": "idle_manager_deinit", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "idle_manager_t*", + "name": "idle_manager", + "desc": "idle_manager_t管理器对象。" + } + ], + "annotation": {}, + "desc": "析构并释放idle_manager_t管理器。", + "name": "idle_manager_destroy", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "idle_manager_t*", + "name": "idle_manager", + "desc": "idle_manager_t管理器对象。" + } + ], + "annotation": {}, + "desc": "返回idle的个数。", + "name": "idle_manager_count", + "return": { + "type": "uint32_t", + "desc": "返回timer的个数。" + } + }, + { + "params": [ + { + "type": "idle_manager_t*", + "name": "idle_manager", + "desc": "idle_manager_t管理器对象。" + } + ], + "annotation": {}, + "desc": "删除全部idle。", + "name": "idle_manager_remove_all", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "idle_manager_t*", + "name": "idle_manager", + "desc": "idle_manager_t管理器对象。" + }, + { + "type": "uint32_t", + "name": "idle_id", + "desc": "idle_id。" + } + ], + "annotation": {}, + "desc": "根据idle_id删除idle。", + "name": "idle_manager_remove", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "idle_manager_t*", + "name": "idle_manager", + "desc": "idle_manager_t管理器对象。" + }, + { + "type": "idle_info_t*", + "name": "idle", + "desc": "idle对象。" + } + ], + "annotation": {}, + "desc": "追加idle。", + "name": "idle_manager_append", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "idle_manager_t*", + "name": "idle_manager", + "desc": "idle_manager_t管理器对象。" + }, + { + "type": "uint32_t", + "name": "idle_id", + "desc": "idle_id。" + } + ], + "annotation": {}, + "desc": "查找指定ID的idle。", + "name": "idle_manager_find", + "return": { + "type": "idle_info_t*", + "desc": "返回idle的信息。" + } + }, + { + "params": [ + { + "type": "idle_manager_t*", + "name": "idle_manager", + "desc": "idle_manager_t管理器对象。" + }, + { + "type": "idle_func_t*", + "name": "on_idle", + "desc": "idle回调函数。" + }, + { + "type": "void*", + "name": "ctx", + "desc": "idle回调函数的上下文。" + } + ], + "annotation": {}, + "desc": "添加idle。", + "name": "idle_manager_add", + "return": { + "type": "uint32_t", + "desc": "返回idle的ID,TK_INVALID_ID表示失败。" + } + } + ], + "events": [], + "properties": [], + "header": "tkc/idle_manager.h", + "desc": "idle_manager_t管理器。", + "name": "idle_manager_t", + "annotation": { + "scriptable": true + }, + "level": 1 + }, + { + "type": "class", + "methods": [], + "events": [], + "properties": [ + { + "name": "name", + "desc": "名称。", + "type": "const char*", + "annotation": { + "readable": true + } + }, + { + "name": "desc", + "desc": "描述。", + "type": "const char*", + "annotation": { + "readable": true + } + }, + { + "name": "exec", + "desc": "函数指针。", + "type": "func_exec_t", + "annotation": { + "readable": true + } + }, + { + "name": "args", + "desc": "函数参数描述。", + "type": "arg_desc_t**", + "annotation": { + "readable": true + } + }, + { + "name": "return_value", + "desc": "函数返回值描述。", + "type": "value_desc_t*", + "annotation": { + "readable": true + } + } + ], + "header": "tkc/func_desc.h", + "desc": "函数描述。", + "name": "func_desc_t", + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "type": "func_call_parser_t*", + "name": "parser", + "desc": "parser对象。" + }, + { + "type": "const char*", + "name": "str", + "desc": "要解析的字符串。" + }, + { + "type": "uint32_t", + "name": "size", + "desc": "字符串长度。" + } + ], + "annotation": { + "constructor": true + }, + "desc": "初始化parser对象。", + "name": "func_call_parser_init", + "return": { + "type": "func_call_parser_t*", + "desc": "parser对象本身。" + } + }, + { + "params": [ + { + "type": "func_call_parser_t*", + "name": "parser", + "desc": "parser对象。" + } + ], + "annotation": {}, + "desc": "开始解析。", + "name": "func_call_parser_parse", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "func_call_parser_t*", + "name": "parser", + "desc": "parser对象。" + } + ], + "annotation": {}, + "desc": "重置parser。", + "name": "func_call_parser_deinit", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "const char*", + "name": "str", + "desc": "要解析的字符串。" + }, + { + "type": "uint32_t", + "name": "size", + "desc": "字符串长度。" + } + ], + "annotation": {}, + "desc": "解析参数,并将结果生成一个object对象。\n\n> 调用者负责释放返回的object对象。", + "name": "func_call_parse", + "return": { + "type": "object_t*", + "desc": "返回object对象。" + } + } + ], + "events": [], + "properties": [], + "header": "tkc/func_call_parser.h", + "desc": "从字符串中解析出函数调用需要的参数。\n\n```\nfunc_call => func_name '(' params ')'\nparams => param ',' params\nparam => name '=' value\nfunc_name => ID\nname = ID\nvalue = int | float | ID\n```\n\n如:move(x=10, y=20)\n如:rename(old_name=aa, new_name=bb)", + "name": "func_call_parser_t", + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "type": "object_t*", + "name": "obj", + "desc": "脚本执行上下文。" + }, + { + "type": "const char*", + "name": "script", + "desc": "脚本代码。" + } + ], + "annotation": {}, + "desc": "创建引擎对象。", + "name": "fscript_create", + "return": { + "type": "fscript_t*", + "desc": "返回fscript对象。" + } + }, + { + "params": [ + { + "type": "fscript_t*", + "name": "fscript", + "desc": "脚本引擎对象。" + }, + { + "type": "value_t*", + "name": "result", + "desc": "执行结果(调用者需要用value_reset函数清除result)。" + } + ], + "annotation": {}, + "desc": "", + "name": "fscript_exec", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "fscript_t*", + "name": "fscript", + "desc": "脚本引擎对象。" + } + ], + "annotation": {}, + "desc": "销毁引擎对象。", + "name": "fscript_destroy", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "object_t*", + "name": "obj", + "desc": "脚本执行上下文。" + }, + { + "type": "const char*", + "name": "script", + "desc": "脚本代码。" + }, + { + "type": "value_t*", + "name": "result", + "desc": "执行结果(调用者需要用value_reset函数清除result)。" + } + ], + "annotation": {}, + "desc": "执行一段脚本。", + "name": "fscript_eval", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [], + "annotation": {}, + "desc": "全局初始化。", + "name": "fscript_global_init", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "const char*", + "name": "name", + "desc": "函数名(无需加函数前缀)。" + }, + { + "type": "fscript_func_t*", + "name": "func", + "desc": "函数指针。" + } + ], + "annotation": {}, + "desc": "注册全局自定义函数。", + "name": "fscript_register_func", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [], + "annotation": {}, + "desc": "全局释放。", + "name": "fscript_global_deinit", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + } + ], + "events": [], + "properties": [ + { + "name": "str", + "desc": "C语言实现函数可以使用这个变量,可以有效避免内存分配。", + "type": "str_t", + "annotation": { + "readable": true + } + }, + { + "name": "obj", + "desc": "脚本执行上下文。", + "type": "object_t*", + "annotation": { + "readable": true + } + }, + { + "name": "fast_vars", + "desc": "快速访问变量。在脚本可以用a/b/c/d来访问,需要优化时使用。", + "type": "value_t*", + "annotation": { + "readable": true + } + } + ], + "header": "tkc/fscript.h", + "desc": "一个简易的函数式脚本引擎。\n用法请参考:https://github.com/zlgopen/awtk/blob/master/docs/fscript.md", + "name": "fscript_t", + "annotation": { + "fake": true + }, + "level": 1 + }, + { + "type": "class", + "methods": [], + "events": [], + "properties": [ + { + "name": "size", + "desc": "参数个数。", + "type": "uint16_t", + "annotation": { + "readable": true + } + }, + { + "name": "capacity", + "desc": "目前最大容量。", + "type": "uint16_t", + "annotation": { + "readable": true + } + }, + { + "name": "args", + "desc": "参数列表。", + "type": "value_t*", + "annotation": { + "readable": true + } + } + ], + "header": "tkc/fscript.h", + "desc": "扩展函数的参数。", + "name": "fscript_args_t", + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "type": "fs_t*", + "name": "fs", + "desc": "文件系统对象,一般赋值为os_fs()。" + }, + { + "type": "const char*", + "name": "name", + "desc": "文件名。" + }, + { + "type": "const char*", + "name": "mode", + "desc": "打开方式,取值请参考POSIX的[fopen函数](https://www.runoob.com/cprogramming/c-function-fopen.html)相应的参数。" + } + ], + "annotation": {}, + "desc": "打开文件。", + "name": "fs_open_file", + "return": { + "type": "ret_t", + "desc": "返回非NULL表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "fs_t*", + "name": "fs", + "desc": "文件系统对象,一般赋值为os_fs()。" + }, + { + "type": "const char*", + "name": "name", + "desc": "文件名。" + } + ], + "annotation": {}, + "desc": "刪除文件。", + "name": "fs_remove_file", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "fs_t*", + "name": "fs", + "desc": "文件系统对象,一般赋值为os_fs()。" + }, + { + "type": "const char*", + "name": "name", + "desc": "文件名。" + } + ], + "annotation": {}, + "desc": "判断文件是否存在。", + "name": "fs_file_exist", + "return": { + "type": "bool_t", + "desc": "返回TRUE表示存在,否则表示不存在。" + } + }, + { + "params": [ + { + "type": "fs_t*", + "name": "fs", + "desc": "文件系统对象,一般赋值为os_fs()。" + }, + { + "type": "const char*", + "name": "name", + "desc": "旧文件名。" + }, + { + "type": "const char*", + "name": "new_name", + "desc": "新文件名。" + } + ], + "annotation": {}, + "desc": "文件重命名。", + "name": "fs_file_rename", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "fs_t*", + "name": "fs", + "desc": "文件系统对象,一般赋值为os_fs()。" + }, + { + "type": "const char*", + "name": "name", + "desc": "目录名称。" + } + ], + "annotation": {}, + "desc": "打开目录。", + "name": "fs_open_dir", + "return": { + "type": "fs_dir_t", + "desc": "返回非NULL表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "fs_t*", + "name": "fs", + "desc": "文件系统对象,一般赋值为os_fs()。" + }, + { + "type": "const char*", + "name": "name", + "desc": "目录名称。" + } + ], + "annotation": {}, + "desc": "修改当前目录。", + "name": "fs_change_dir", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "fs_t*", + "name": "fs", + "desc": "文件系统对象,一般赋值为os_fs()。" + }, + { + "type": "const char*", + "name": "name", + "desc": "目录名称。" + } + ], + "annotation": {}, + "desc": "创建目录。", + "name": "fs_create_dir", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "fs_t*", + "name": "fs", + "desc": "文件系统对象,一般赋值为os_fs()。" + }, + { + "type": "const char*", + "name": "name", + "desc": "目录名称。" + } + ], + "annotation": {}, + "desc": "刪除目录。", + "name": "fs_remove_dir", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "fs_t*", + "name": "fs", + "desc": "文件系统对象,一般赋值为os_fs()。" + }, + { + "type": "const char*", + "name": "name", + "desc": "目录名称。" + } + ], + "annotation": {}, + "desc": "递归创建目录。", + "name": "fs_create_dir_r", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "fs_t*", + "name": "fs", + "desc": "文件系统对象,一般赋值为os_fs()。" + }, + { + "type": "const char*", + "name": "name", + "desc": "目录名称。" + } + ], + "annotation": {}, + "desc": "递归刪除目录。", + "name": "fs_remove_dir_r", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "fs_t*", + "name": "fs", + "desc": "文件系统对象,一般赋值为os_fs()。" + }, + { + "type": "const char*", + "name": "name", + "desc": "目录名称。" + } + ], + "annotation": {}, + "desc": "判断目录是否存在。", + "name": "fs_dir_exist", + "return": { + "type": "bool_t", + "desc": "返回TRUE表示存在,否则表示不存在。" + } + }, + { + "params": [ + { + "type": "fs_t*", + "name": "fs", + "desc": "文件系统对象,一般赋值为os_fs()。" + }, + { + "type": "const char*", + "name": "name", + "desc": "旧目录名称。" + }, + { + "type": "const char*", + "name": "new_name", + "desc": "新目录名称。" + } + ], + "annotation": {}, + "desc": "目录重命名。", + "name": "fs_dir_rename", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "fs_t*", + "name": "fs", + "desc": "文件系统对象,一般赋值为os_fs()。" + }, + { + "type": "const char*", + "name": "name", + "desc": "文件名。" + } + ], + "annotation": {}, + "desc": "获取文件大小。", + "name": "fs_get_file_size", + "return": { + "type": "ret_t", + "desc": "返回不是-1表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "fs_t*", + "name": "fs", + "desc": "文件系统对象,一般赋值为os_fs()。" + }, + { + "type": "const char*", + "name": "value", + "desc": "卷名。" + }, + { + "type": "int32_t*", + "name": "free_kb", + "desc": "用于返回空闲空间大小(KB)" + }, + { + "type": "int32_t*", + "name": "total_kb", + "desc": "用于返回总共空间大小(KB)" + } + ], + "annotation": {}, + "desc": "获取文件系统信息。", + "name": "fs_get_disk_info", + "return": { + "type": "ret_t", + "desc": "返回不是-1表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "fs_t*", + "name": "fs", + "desc": "文件系统对象,一般赋值为os_fs()。" + }, + { + "type": "const char*", + "name": "name", + "desc": "文件名。" + }, + { + "type": "fs_stat_info_t*", + "name": "fst", + "desc": "文件状态信息。" + } + ], + "annotation": {}, + "desc": "获取文件信息。", + "name": "fs_stat", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "fs_t*", + "name": "fs", + "desc": "文件系统对象,一般赋值为os_fs()。" + }, + { + "type": "char*", + "name": "path", + "desc": "保存可执行文件的路径。" + } + ], + "annotation": {}, + "desc": "获取可执行文件所在目录。", + "name": "fs_get_exe", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "fs_t*", + "name": "fs", + "desc": "文件系统对象,一般赋值为os_fs()。" + }, + { + "type": "char*", + "name": "path", + "desc": "保存路径。" + } + ], + "annotation": {}, + "desc": "获取home目录或者应用程序可以写入数据的目录。", + "name": "fs_get_user_storage_path", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "fs_t*", + "name": "fs", + "desc": "文件系统对象,一般赋值为os_fs()。" + }, + { + "type": "char*", + "name": "path", + "desc": "保存路径。" + } + ], + "annotation": {}, + "desc": "获取临时目录。", + "name": "fs_get_temp_path", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "fs_t*", + "name": "fs", + "desc": "文件系统对象,一般赋值为os_fs()。" + }, + { + "type": "char*", + "name": "path", + "desc": "保存当前所在目录的路径。" + } + ], + "annotation": {}, + "desc": "获取当前所在目录。", + "name": "fs_get_cwd", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "char*", + "name": "filename", + "desc": "用于返回完整路径的文件名。" + }, + { + "type": "const char*", + "name": "appname", + "desc": "应用程序的名称。" + }, + { + "type": "const char*", + "name": "name", + "desc": "文件名(不包括路径)。" + } + ], + "annotation": {}, + "desc": "生成一个保存数据文件的完整路径的文件名。", + "name": "fs_build_user_storage_file_name", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [], + "annotation": { + "constructor": true + }, + "desc": "获取缺省的文件系统对象。", + "name": "os_fs", + "return": { + "type": "fs_t*", + "desc": "返回文件系统对象。" + } + }, + { + "params": [ + { + "type": "const char*", + "name": "name", + "desc": "文件名。" + } + ], + "annotation": {}, + "desc": "判断文件是否存在。", + "name": "file_exist", + "return": { + "type": "bool_t", + "desc": "返回TRUE表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "const char*", + "name": "name", + "desc": "文件名。" + } + ], + "annotation": {}, + "desc": "刪除文件。", + "name": "file_remove", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "const char*", + "name": "name", + "desc": "文件名。" + } + ], + "annotation": {}, + "desc": "获取文件大小。", + "name": "file_get_size", + "return": { + "type": "int32_t", + "desc": "返回非负表示文件大小,否则表示失败。" + } + }, + { + "params": [ + { + "type": "const char*", + "name": "name", + "desc": "文件名。" + }, + { + "type": "uint32_t*", + "name": "size", + "desc": "返回实际读取的长度。" + } + ], + "annotation": {}, + "desc": "读取文件的全部内容。", + "name": "file_read", + "return": { + "type": "void*", + "desc": "返回读取的数据,需要调用TKMEM_FREE释放。" + } + }, + { + "params": [ + { + "type": "const char*", + "name": "name", + "desc": "文件名。" + }, + { + "type": "const void*", + "name": "buffer", + "desc": "数据缓冲区。" + }, + { + "type": "uint32_t", + "name": "size", + "desc": "数据长度。" + }, + { + "type": "uint32_t", + "name": "offset", + "desc": "偏移量。" + } + ], + "annotation": {}, + "desc": "从某个位置读取文件。", + "name": "file_read_part", + "return": { + "type": "int32_t", + "desc": "返回实际读取的字节数。" + } + }, + { + "params": [ + { + "type": "const char*", + "name": "name", + "desc": "文件名。" + }, + { + "type": "const void*", + "name": "buffer", + "desc": "数据缓冲区。" + }, + { + "type": "uint32_t", + "name": "size", + "desc": "数据长度。" + } + ], + "annotation": {}, + "desc": "写入文件。", + "name": "file_write", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + } + ], + "events": [], + "properties": [], + "header": "tkc/fs.h", + "desc": "文件系统接口。", + "name": "fs_t", + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "type": "fs_dir_t*", + "name": "dir", + "desc": "文件夹对象。" + } + ], + "annotation": {}, + "desc": "重置文件夹读取位置到开始。", + "name": "fs_dir_rewind", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "fs_dir_t*", + "name": "dir", + "desc": "文件夹对象。" + }, + { + "type": "fs_item_t*", + "name": "item", + "desc": "返回一项。" + } + ], + "annotation": {}, + "desc": "读取文件夹对象。", + "name": "fs_dir_read", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "fs_dir_t*", + "name": "dir", + "desc": "文件夹对象。" + } + ], + "annotation": {}, + "desc": "关闭文件夹对象。", + "name": "fs_dir_close", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + } + ], + "events": [], + "properties": [], + "header": "tkc/fs.h", + "desc": "文件夹接口。", + "name": "fs_dir_t", + "level": 1 + }, + { + "type": "class", + "methods": [], + "events": [], + "properties": [ + { + "name": "is_dir", + "desc": "是否是目录。", + "type": "bool_t", + "annotation": { + "readable": true + } + }, + { + "name": "is_link", + "desc": "是否是符号链接。", + "type": "bool_t", + "annotation": { + "readable": true + } + }, + { + "name": "is_reg_file", + "desc": "是否是普通文件。", + "type": "bool_t", + "annotation": { + "readable": true + } + }, + { + "name": "name", + "desc": "名称。", + "type": "char*", + "annotation": { + "readable": true + } + } + ], + "header": "tkc/fs.h", + "desc": "代表目录或文件。", + "name": "fs_item_t", + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "type": "fs_file_t*", + "name": "file", + "desc": "文件对象。" + }, + { + "type": "void*", + "name": "buffer", + "desc": "用于返回数据的缓冲区。" + }, + { + "type": "uint32_t", + "name": "size", + "desc": "缓冲区大小。" + } + ], + "annotation": {}, + "desc": "读取文件。", + "name": "fs_file_read", + "return": { + "type": "int32_t", + "desc": "返回实际读取的字节数。" + } + }, + { + "params": [ + { + "type": "fs_file_t*", + "name": "file", + "desc": "文件对象。" + }, + { + "type": "char*", + "name": "buffer", + "desc": "用于返回数据的缓冲区。" + }, + { + "type": "uint32_t", + "name": "size", + "desc": "缓冲区大小。" + } + ], + "annotation": {}, + "desc": "读取一行文本。\n> 需要用二进制格式打开,否则Windows下,系统会修改换行符。", + "name": "fs_file_read_line", + "return": { + "type": "int32_t", + "desc": "返回实际读取的字节数。" + } + }, + { + "params": [ + { + "type": "fs_file_t*", + "name": "file", + "desc": "文件对象。" + }, + { + "type": "const void*", + "name": "buffer", + "desc": "数据缓冲区。" + }, + { + "type": "uint32_t", + "name": "size", + "desc": "数据长度。" + } + ], + "annotation": {}, + "desc": "写入文件。", + "name": "fs_file_write", + "return": { + "type": "int32_t", + "desc": "返回实际写入的字节数。" + } + }, + { + "params": [ + { + "type": "fs_file_t*", + "name": "file", + "desc": "文件对象。" + }, + { + "type": "const char* const", + "name": "format_str", + "desc": "格式化字符串。" + } + ], + "annotation": {}, + "desc": "写入文件。", + "name": "fs_file_printf", + "return": { + "type": "int32_t", + "desc": "返回实际写入的字节数。" + } + }, + { + "params": [ + { + "type": "fs_file_t*", + "name": "file", + "desc": "文件对象。" + }, + { + "type": "uint32_t", + "name": "offset", + "desc": "数据长度。" + } + ], + "annotation": {}, + "desc": "定位读写指针到指定的位置。", + "name": "fs_file_seek", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "fs_file_t*", + "name": "file", + "desc": "文件对象。" + } + ], + "annotation": {}, + "desc": "清除文件内容。", + "name": "fs_file_truncate", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "fs_file_t*", + "name": "file", + "desc": "文件对象。" + } + ], + "annotation": {}, + "desc": "关闭文件。", + "name": "fs_file_close", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "fs_file_t*", + "name": "file", + "desc": "文件对象。" + } + ], + "annotation": {}, + "desc": "同步文件到磁盘。", + "name": "fs_file_sync", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "fs_file_t*", + "name": "file", + "desc": "文件对象。" + }, + { + "type": "fs_stat_info_t*", + "name": "fst", + "desc": "文件状态信息。" + } + ], + "annotation": {}, + "desc": "获取文件信息。", + "name": "fs_file_stat", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "fs_file_t*", + "name": "file", + "desc": "文件对象。" + } + ], + "annotation": {}, + "desc": "判断文件是否结束。", + "name": "fs_file_eof", + "return": { + "type": "bool_t", + "desc": "返回TRUE表示结束,否则表示没结束。" + } + }, + { + "params": [ + { + "type": "fs_file_t*", + "name": "file", + "desc": "文件对象。" + } + ], + "annotation": {}, + "desc": "获取文件当前读写位置。", + "name": "fs_file_tell", + "return": { + "type": "int64_t", + "desc": "返回文件当前读写位置。" + } + }, + { + "params": [ + { + "type": "fs_file_t*", + "name": "file", + "desc": "文件对象。" + } + ], + "annotation": {}, + "desc": "获取文件大小。", + "name": "fs_file_size", + "return": { + "type": "int64_t", + "desc": "返回文件大小。" + } + } + ], + "events": [], + "properties": [], + "header": "tkc/fs.h", + "desc": "文件接口。\n\n示例:\n\n```c\nint32_t ret = 0;\nconst char* file_name = \"test.txt\";\nint32_t len = file_get_size(file_name);\nuint8_t* buff = (uint8_t*)TKMEM_ALLOC(len + 1);\nreturn_value_if_fail(buff != NULL, NULL);\n\nfs_file_t* fp = fs_open_file(os_fs(), file_name, \"rb\");\nif (fp != NULL) {\nret = fs_file_read(fp, buff, len);\nfs_file_close(fp);\n}\n```", + "name": "fs_file_t", + "annotation": { + "fake": true + }, + "level": 1 + }, + { + "type": "class", + "methods": [], + "events": [], + "properties": [ + { + "name": "size", + "desc": "文件大小。", + "type": "uint64_t" + }, + { + "name": "atime", + "desc": "最后访问时间。", + "type": "uint64_t" + }, + { + "name": "mtime", + "desc": "最后修改时间。", + "type": "uint64_t" + }, + { + "name": "ctime", + "desc": "创建时间。", + "type": "uint64_t" + }, + { + "name": "is_dir", + "desc": "是否为目录。", + "type": "bool_t" + }, + { + "name": "is_link", + "desc": "是否为链接。", + "type": "bool_t" + }, + { + "name": "is_reg_file", + "desc": "是否普通文件。", + "type": "bool_t" + } + ], + "header": "tkc/fs.h", + "desc": "文件状态信息。", + "name": "fs_stat_info_t", + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "type": "uint32_t", + "name": "w", + "desc": "离线 canvas 的宽。" + }, + { + "type": "uint32_t", + "name": "h", + "desc": "离线 canvas 的高。" + }, + { + "type": "bitmap_format_t", + "name": "format", + "desc": "离线 canvas 的格式。" + } + ], + "annotation": {}, + "desc": "创建一个离线的 canvas\n在 opengl 模式下 format 参数只能为 BITMAP_FMT_RGBA8888\n在其他模式下,离线 canvas 格式可以为 rgba,bgar,bgr565和rgb565", + "name": "canvas_offline_create", + "return": { + "type": "canvas_t*", + "desc": "成功返回 canvas ,失败返回 NULL。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "canvas", + "desc": "离线 canvas 对象。" + } + ], + "annotation": {}, + "desc": "清除离线 canvas 所有数据,并把背景设置为全透明(注意:该离线 canvas 需要有透明通道)\n该函数调用前必须要先 canvas_offline_begin_draw 函数。\n该函数用来解决离线 canvas 多次绘图半透效果后导致半透效果无效的问题。", + "name": "canvas_offline_clear_canvas", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "canvas", + "desc": "离线 canvas 对象。" + } + ], + "annotation": {}, + "desc": "设置离线 canvas 开始绘图", + "name": "canvas_offline_begin_draw", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "canvas", + "desc": "离线 canvas 对象。" + } + ], + "annotation": {}, + "desc": "设置离线 canvas 结束绘图", + "name": "canvas_offline_end_draw", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "canvas", + "desc": "离线 canvas 对象。" + } + ], + "annotation": {}, + "desc": "获取离线 canvas 的离线 bitmap。", + "name": "canvas_offline_get_bitmap", + "return": { + "type": "bitmap_t*", + "desc": "返回 bitmap_t 对象表示成功,返回 NULL 表示失败。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "canvas", + "desc": "离线 canvas 对象。" + }, + { + "type": "bitmap_t*", + "name": "bitmap", + "desc": "新的 bitmap 对象。" + } + ], + "annotation": {}, + "desc": "把离线 canvas 的离线 bitmap 移动赋值给新的 bitmap。\n移动赋值后原来的离线 canvas 的离线 bitmap 就会被置空。\n备注:在移动赋值之前会先调用 canvas_offline_flush_bitmap 把数据回流到内存中。", + "name": "canvas_offline_bitmap_move_to_new_bitmap", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "canvas", + "desc": "离线 canvas 对象。" + } + ], + "annotation": {}, + "desc": "把离线 canvas 的数据放到绑定的 bitmap 中\n该函数只有在 opengl 模式才需要调用,是否把显存中的数据回传到内存中。", + "name": "canvas_offline_flush_bitmap", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "canvas", + "desc": "离线 canvas 对象。" + } + ], + "annotation": {}, + "desc": "释放离线 canvas 和离线 bitmap", + "name": "canvas_offline_destroy", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "uint32_t", + "name": "w", + "desc": "离线 canvas 的宽。" + }, + { + "type": "uint32_t", + "name": "h", + "desc": "离线 canvas 的高。" + }, + { + "type": "bitmap_format_t", + "name": "format", + "desc": "离线 canvas 的格式。" + } + ], + "annotation": {}, + "desc": "用户自定义 canvas_offline_create", + "name": "canvas_offline_custom_create", + "export": "none", + "return": { + "type": "canvas_t*", + "desc": "成功返回 canvas ,失败返回 NULL。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "canvas", + "desc": "离线 canvas 对象。" + } + ], + "annotation": {}, + "desc": "用户自定义 canvas_offline_custom_clear_canvas", + "name": "canvas_offline_custom_clear_canvas", + "export": "none", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "canvas", + "desc": "离线 canvas 对象。" + } + ], + "annotation": {}, + "desc": "用户自定义 canvas_offline_custom_begin_draw", + "name": "canvas_offline_custom_begin_draw", + "export": "none", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "canvas", + "desc": "离线 canvas 对象。" + } + ], + "annotation": {}, + "desc": "用户自定义 canvas_offline_custom_end_draw", + "name": "canvas_offline_custom_end_draw", + "export": "none", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "canvas", + "desc": "离线 canvas 对象。" + } + ], + "annotation": {}, + "desc": "用户自定义 canvas_offline_custom_get_bitmap", + "name": "canvas_offline_custom_get_bitmap", + "export": "none", + "return": { + "type": "bitmap_t*", + "desc": "返回 bitmap_t 对象表示成功,返回 NULL 表示失败。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "canvas", + "desc": "离线 canvas 对象。" + } + ], + "annotation": {}, + "desc": "用户自定义 canvas_offline_custom_bitmap_move_to_new_bitmap", + "name": "canvas_offline_custom_bitmap_move_to_new_bitmap", + "export": "none", + "return": { + "type": "bitmap_t*", + "desc": "返回 bitmap_t 对象表示成功,返回 NULL 表示失败。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "canvas", + "desc": "离线 canvas 对象。" + } + ], + "annotation": {}, + "desc": "用户自定义 canvas_offline_custom_flush_bitmap", + "name": "canvas_offline_custom_flush_bitmap", + "export": "none", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "canvas", + "desc": "离线 canvas 对象。" + } + ], + "annotation": {}, + "desc": "用户自定义 canvas_offline_custom_destroy", + "name": "canvas_offline_custom_destroy", + "export": "none", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + } + ], + "events": [], + "properties": [ + { + "name": "bitmap", + "desc": "绑定的离线 bitmap", + "type": "bitmap_t*", + "annotation": { + "readable": true + } + } + ], + "header": "base/canvas_offline.h", + "desc": "离线画布 canvas。", + "name": "canvas_offline_t", + "annotation": { + "scriptable": true + }, + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "type": "event_source_manager_t*", + "name": "manager", + "desc": "event_source_manager对象。" + } + ], + "annotation": {}, + "desc": "初始化。", + "name": "event_source_manager_init", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "event_source_manager_t*", + "name": "manager", + "desc": "event_source_manager对象。" + } + ], + "annotation": {}, + "desc": "~初始化。", + "name": "event_source_manager_deinit", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "event_source_manager_t*", + "name": "manager", + "desc": "event_source_manager对象。" + } + ], + "annotation": {}, + "desc": "获取wakeup时间(ms)", + "name": "event_source_manager_get_wakeup_time", + "return": { + "type": "uint32_t", + "desc": "返回wakeup时间(ms)。" + } + }, + { + "params": [ + { + "type": "event_source_manager_t*", + "name": "manager", + "desc": "event_source_manager对象。" + } + ], + "annotation": {}, + "desc": "分发事件。", + "name": "event_source_manager_dispatch", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "event_source_manager_t*", + "name": "manager", + "desc": "event_source_manager对象。" + }, + { + "type": "event_source_t*", + "name": "source", + "desc": "event_source对象。" + } + ], + "annotation": {}, + "desc": "增加事件源对象。", + "name": "event_source_manager_add", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "event_source_manager_t*", + "name": "manager", + "desc": "event_source_manager对象。" + }, + { + "type": "event_source_t*", + "name": "source", + "desc": "event_source对象。" + } + ], + "annotation": {}, + "desc": "移除事件源对象。", + "name": "event_source_manager_remove", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "event_source_manager_t*", + "name": "manager", + "desc": "event_source_manager对象。" + }, + { + "type": "void*", + "name": "tag", + "desc": "tag。" + } + ], + "annotation": {}, + "desc": "移除所有tag相同的事件源对象。", + "name": "event_source_manager_remove_by_tag", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "event_source_manager_t*", + "name": "manager", + "desc": "event_source_manager对象。" + } + ], + "annotation": {}, + "desc": "销毁事件源管理器。", + "name": "event_source_manager_destroy", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + } + ], + "events": [], + "properties": [], + "header": "tkc/event_source_manager.h", + "desc": "事件源管理器。", + "name": "event_source_manager_t", + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "type": "canvas_t*", + "name": "c", + "desc": "canvas对象。" + }, + { + "type": "lcd_t*", + "name": "lcd", + "desc": "lcd对象。" + }, + { + "type": "font_manager_t*", + "name": "font_manager", + "desc": "字体管理器对象。" + } + ], + "annotation": {}, + "desc": "初始化,系统内部调用。", + "name": "canvas_init", + "return": { + "type": "canvas_t*", + "desc": "返回canvas对象本身。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "c", + "desc": "canvas对象。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "获取画布的宽度。", + "name": "canvas_get_width", + "return": { + "type": "wh_t", + "desc": "返回画布的宽度。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "c", + "desc": "canvas对象。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "获取画布的高度。", + "name": "canvas_get_height", + "return": { + "type": "wh_t", + "desc": "返回画布的高度。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "c", + "desc": "canvas对象。" + }, + { + "type": "rect_t*", + "name": "r", + "desc": "rect对象。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "获取裁剪区。", + "name": "canvas_get_clip_rect", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "c", + "desc": "canvas对象。" + }, + { + "type": "const rect_t*", + "name": "r", + "desc": "rect对象。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "设置裁剪区。", + "name": "canvas_set_clip_rect", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "c", + "desc": "canvas对象。" + }, + { + "type": "const rect_t*", + "name": "r", + "desc": "rect对象。" + }, + { + "type": "bool_t", + "name": "translate", + "desc": "是否将裁剪区的位置加上canvas当前的偏移。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "设置裁剪区。", + "name": "canvas_set_clip_rect_ex", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "c", + "desc": "canvas对象。" + }, + { + "type": "color_t", + "name": "color", + "desc": "颜色。" + } + ], + "annotation": {}, + "desc": "设置填充颜色。", + "name": "canvas_set_fill_color", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "c", + "desc": "canvas对象。" + }, + { + "type": "color_t", + "name": "color", + "desc": "颜色。" + } + ], + "annotation": {}, + "desc": "设置文本颜色。", + "name": "canvas_set_text_color", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "c", + "desc": "canvas对象。" + }, + { + "type": "color_t", + "name": "color", + "desc": "颜色。" + } + ], + "annotation": {}, + "desc": "设置线条颜色。", + "name": "canvas_set_stroke_color", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "c", + "desc": "canvas对象。" }, { "type": "const char*", @@ -45045,8 +36247,9 @@ "annotation": { "scriptable": true }, - "desc": "设置颜色。", - "name": "color_picker_set_color", + "desc": "设置填充颜色。\n\n> 供脚本语言使用。", + "name": "canvas_set_fill_color_str", + "alias": "canvas_set_fill_color", "return": { "type": "ret_t", "desc": "返回RET_OK表示成功,否则表示失败。" @@ -45055,140 +36258,158 @@ { "params": [ { - "type": "widget_t*", - "name": "widget", - "desc": "color_picker对象。" + "type": "canvas_t*", + "name": "c", + "desc": "canvas对象。" + }, + { + "type": "const char*", + "name": "color", + "desc": "颜色。" } ], "annotation": { - "cast": true, "scriptable": true }, - "desc": "转换为color_picker对象(供脚本语言使用)。", - "name": "color_picker_cast", + "desc": "设置文本颜色。\n\n> 供脚本语言使用。", + "name": "canvas_set_text_color_str", + "alias": "canvas_set_text_color", "return": { - "type": "widget_t*", - "desc": "color_picker对象。" + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" } - } - ], - "events": [ - { - "name": "EVT_VALUE_WILL_CHANGE", - "desc": "值(颜色)即将改变事件。", - "type": "event_t" }, - { - "name": "EVT_VALUE_CHANGED", - "desc": "值(颜色)改变事件。", - "type": "event_t" - } - ], - "properties": [ - { - "name": "value", - "desc": "颜色。", - "type": "const char*", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - } - ], - "header": "color_picker/color_picker.h", - "desc": "颜色选择器。\n\ncolor\\_picker\\_t是[widget\\_t](widget_t.md)的子类控件,widget\\_t的函数均适用于color\\_picker\\_t控件。\n\n在xml中使用\"color\\_picker\"标签创建颜色选择器控件。如:\n\n```xml\n\n\n\n\n\n\n```\n\n> 更多用法请参考:\n[color\\_picker](https://github.com/zlgopen/awtk/blob/master/design/default/ui/color_picker.xml)\n\n其中的子控件必须按下列规则命名:\n\n* r 红色分量。可以是spin_box、edit和slider。\n* g 绿色分量。可以是spin_box、edit和slider。\n* b 蓝色分量。可以是spin_box、edit和slider。\n* h Hue分量。可以是spin_box、edit、slider和color_component。\n* s Saturation分量。可以是spin_box、edit和slider。\n* v Value/Brightness分量。可以是spin_box、edit和slider。\n* sv Saturation和Value/Brightness分量。可以是color_component。\n* old 旧的值。可以是spin_box、edit和color_tile。\n* new 新的值。可以是spin_box、edit和color_tile。", - "name": "color_picker_t", - "parent": "widget_t", - "annotation": { - "scriptable": true, - "design": true, - "widget": true - }, - "level": 2 - }, - { - "type": "class", - "methods": [ { "params": [ { - "type": "widget_t*", - "name": "parent", - "desc": "父控件" + "type": "canvas_t*", + "name": "c", + "desc": "canvas对象。" + }, + { + "type": "const char*", + "name": "color", + "desc": "颜色。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "设置线条颜色。\n\n> 供脚本语言使用。", + "name": "canvas_set_stroke_color_str", + "alias": "canvas_set_stroke_color", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "c", + "desc": "canvas对象。" + }, + { + "type": "uint8_t", + "name": "alpha", + "desc": "alpha值。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "设置全局alpha值。", + "name": "canvas_set_global_alpha", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "c", + "desc": "canvas对象。" + }, + { + "type": "xy_t", + "name": "dx", + "desc": "x偏移。" + }, + { + "type": "xy_t", + "name": "dy", + "desc": "y偏移。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "平移原点坐标。", + "name": "canvas_translate", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "c", + "desc": "canvas对象。" + }, + { + "type": "xy_t", + "name": "dx", + "desc": "x偏移。" + }, + { + "type": "xy_t", + "name": "dy", + "desc": "y偏移。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "反向平移原点坐标。", + "name": "canvas_untranslate", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "c", + "desc": "canvas对象。" }, { "type": "xy_t", "name": "x", - "desc": "x坐标" + "desc": "x坐标。" }, { "type": "xy_t", "name": "y", - "desc": "y坐标" - }, - { - "type": "wh_t", - "name": "w", - "desc": "宽度" + "desc": "y坐标。" }, { "type": "wh_t", "name": "h", - "desc": "高度" - } - ], - "annotation": { - "constructor": true, - "scriptable": true - }, - "desc": "创建draggable对象", - "name": "draggable_create", - "return": { - "type": "widget_t*", - "desc": "对象。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "draggable对象。" - } - ], - "annotation": { - "cast": true, - "scriptable": true - }, - "desc": "转换为draggable对象(供脚本语言使用)。", - "name": "draggable_cast", - "return": { - "type": "widget_t*", - "desc": "draggable对象。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "widget对象。" - }, - { - "type": "int32_t", - "name": "top", - "desc": "拖动范围的顶部限制。缺省为父控件的顶部。" + "desc": "高度。" } ], "annotation": { "scriptable": true }, - "desc": "设置top。", - "name": "draggable_set_top", + "desc": "画垂直线。", + "name": "canvas_draw_vline", "return": { "type": "ret_t", "desc": "返回RET_OK表示成功,否则表示失败。" @@ -45197,326 +36418,31 @@ { "params": [ { - "type": "widget_t*", - "name": "widget", - "desc": "widget对象。" - }, - { - "type": "int32_t", - "name": "bottom", - "desc": "拖动范围的底部限制。缺省为父控件的底部。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置bottom。", - "name": "draggable_set_bottom", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "widget对象。" - }, - { - "type": "int32_t", - "name": "left", - "desc": "拖动范围的左边限制。缺省为父控件的左边。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置left。", - "name": "draggable_set_left", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "widget对象。" - }, - { - "type": "int32_t", - "name": "right", - "desc": "拖动范围的右边限制。缺省为父控件的右边边。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置right。", - "name": "draggable_set_right", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "widget对象。" - }, - { - "type": "bool_t", - "name": "vertical_only", - "desc": "只允许垂直拖动。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置vertical_only。", - "name": "draggable_set_vertical_only", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "widget对象。" - }, - { - "type": "bool_t", - "name": "horizontal_only", - "desc": "只允许水平拖动。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置horizontal_only。", - "name": "draggable_set_horizontal_only", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "widget对象。" - }, - { - "type": "bool_t", - "name": "drag_window", - "desc": "drag_window" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置drag_window。\n拖动窗口而不是父控件。比如放在对话框的titlebar上,拖动titlebar其实是希望拖动对话框。", - "name": "draggable_set_drag_window", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [ - { - "name": "top", - "desc": "拖动范围的顶部限制。缺省为父控件的顶部。", - "type": "int32_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "bottom", - "desc": "拖动范围的底部限制。缺省为父控件的底部。", - "type": "int32_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "left", - "desc": "拖动范围的左边限制。缺省为父控件的左边。", - "type": "int32_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "right", - "desc": "拖动范围的右边限制。缺省为父控件的右边边。", - "type": "int32_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "vertical_only", - "desc": "只允许垂直拖动。", - "type": "bool_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "horizontal_only", - "desc": "只允许水平拖动。", - "type": "bool_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "drag_window", - "desc": "拖动窗口而不是父控件。比如放在对话框的titlebar上,拖动titlebar其实是希望拖动对话框。", - "type": "bool_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - } - ], - "header": "features/draggable.h", - "desc": "将draggable放入目标控件,即可让目标控件或当前窗口可以被拖动。\n\ndraggable\\_t是[widget\\_t](widget_t.md)的子类控件,widget\\_t的函数均适用于draggable\\_t控件。\n\n在xml中使用\"draggable\"标签创建draggable控件。如:\n\n```xml\n\n```\n\n拖动对话框标题时移动对话框:\n\n```xml\n\n\n\n```\n\n> 更多用法请参考:\n[draggable.xml](https://github.com/zlgopen/awtk/blob/master/design/default/ui/draggable.xml)\n\n在c代码中使用函数draggable\\_create创建按钮控件。如:\n\n```c\nwidget_t* draggable = draggable_create(target, 0, 0, 0, 0);\n```\n\n> draggable本身不可见,故无需style。", - "name": "draggable_t", - "parent": "widget_t", - "annotation": { - "scriptable": true, - "design": true, - "widget": true - }, - "level": 2 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "widget_t*", - "name": "parent", - "desc": "父控件" + "type": "canvas_t*", + "name": "c", + "desc": "canvas对象。" }, { "type": "xy_t", "name": "x", - "desc": "x坐标" + "desc": "x坐标。" }, { "type": "xy_t", "name": "y", - "desc": "y坐标" + "desc": "y坐标。" }, { "type": "wh_t", "name": "w", - "desc": "宽度" - }, - { - "type": "wh_t", - "name": "h", - "desc": "高度" - } - ], - "annotation": { - "constructor": true, - "scriptable": true - }, - "desc": "创建file_browser_view对象", - "name": "file_browser_view_create", - "return": { - "type": "widget_t*", - "desc": "对象。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "file_browser_view对象。" - } - ], - "annotation": { - "cast": true, - "scriptable": true - }, - "desc": "转换为file_browser_view对象(供脚本语言使用)。", - "name": "file_browser_view_cast", - "return": { - "type": "widget_t*", - "desc": "file_browser_view对象。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "widget对象。" - }, - { - "type": "const char*", - "name": "init_dir", - "desc": "初始文件夹。" + "desc": "宽度。" } ], "annotation": { "scriptable": true }, - "desc": "设置 初始文件夹。", - "name": "file_browser_view_set_init_dir", + "desc": "画水平线。", + "name": "canvas_draw_hline", "return": { "type": "ret_t", "desc": "返回RET_OK表示成功,否则表示失败。" @@ -45525,221 +36451,972 @@ { "params": [ { - "type": "widget_t*", - "name": "widget", - "desc": "widget对象。" + "type": "canvas_t*", + "name": "c", + "desc": "canvas对象。" }, { - "type": "const char*", - "name": "filter", - "desc": "过滤规则。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置 过滤规则。\n> files_only 表示只列出文件,dir_only 表示只列出目录,其它表示只列出满足扩展名文件集合(如:.jpg.png.gif)。", - "name": "file_browser_view_set_filter", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "widget对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "重新加载。", - "name": "file_browser_view_reload", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "widget对象。" - }, - { - "type": "bool_t", - "name": "ignore_hidden_files", - "desc": "忽略隐藏文件。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置 忽略隐藏文件。", - "name": "file_browser_view_set_ignore_hidden_files", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "widget对象。" - }, - { - "type": "bool_t", - "name": "sort_ascending", - "desc": "是否为升序排序。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置 是否为升序排序。", - "name": "file_browser_view_set_sort_ascending", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "widget对象。" - }, - { - "type": "bool_t", - "name": "show_check_button", - "desc": "是否显示checkbutton。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置 是否显示checkbutton。", - "name": "file_browser_view_set_show_check_button", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "widget对象。" - }, - { - "type": "const char*", - "name": "sort_by", - "desc": "排序方式。可选值(name, size, mtime, type)。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置 排序方式。可选值(name, size, mtime, type)。", - "name": "file_browser_view_set_sort_by", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "widget对象。" - } - ], - "annotation": {}, - "desc": "返回当前选中的项目。\n\n> 在返回数组中,每个元素是一个fb\\_item\\_t对象。\n> 调用者无需释放返回值,返回值只在当次调用有效。", - "name": "file_browser_view_get_selected_items", - "return": { - "type": "darray_t*", - "desc": "返回当前选中的项目。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "widget对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取当前路径。", - "name": "file_browser_view_get_cwd", - "return": { - "type": "const char*", - "desc": "返回当前路径。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "widget对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "子文件夹名。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "在当前文件夹创建子文件夹。", - "name": "file_browser_view_create_dir", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "widget对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "文件名。" - }, - { - "type": "const char*", - "name": "data", - "desc": "数据。" + "type": "const point_t*", + "name": "points", + "desc": "点数组。" }, { "type": "uint32_t", - "name": "size", - "desc": "数据长度。" + "name": "nr", + "desc": "点的个数。" + } + ], + "annotation": {}, + "desc": "画多个点。", + "name": "canvas_draw_points", + "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": "file_browser_view_create_file", + "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": "用填充颜色填充指定矩形。\n\n> 如果lcd的颜色格式带alpha通道,连同alpha的值一起修改。", + "name": "canvas_clear_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_stroke_rect", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "c", + "desc": "canvas对象。" + }, + { + "type": "const char*", + "name": "name", + "desc": "字体名称。" + }, + { + "type": "font_size_t", + "name": "size", + "desc": "字体大小。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "设置字体。", + "name": "canvas_set_font", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "c", + "desc": "canvas对象。" + }, + { + "type": "align_h_t", + "name": "align_h", + "desc": "水平对齐方式。" + }, + { + "type": "align_v_t", + "name": "align_v", + "desc": "垂直对齐方式。" + } + ], + "annotation": {}, + "desc": "设置文本对齐方式。", + "name": "canvas_set_text_align", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "c", + "desc": "canvas对象。" + }, + { + "type": "const wchar_t*", + "name": "str", + "desc": "字符串。" + }, + { + "type": "uint32_t", + "name": "nr", + "desc": "字符数。" + } + ], + "annotation": {}, + "desc": "计算文本所占的宽度。", + "name": "canvas_measure_text", + "return": { + "type": "float_t", + "desc": "返回文本所占的宽度。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "c", + "desc": "canvas对象。" + } + ], + "annotation": {}, + "desc": "获取字体的高度。", + "name": "canvas_get_font_height", + "return": { + "type": "float_t", + "desc": "返回字体的高度。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "c", + "desc": "canvas对象。" + }, + { + "type": "const char*", + "name": "str", + "desc": "字符串。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "计算文本所占的宽度。\n\n> 供脚本语言使用。", + "name": "canvas_measure_utf8", + "alias": "canvas_measure_text", + "return": { + "type": "float_t", + "desc": "返回文本所占的宽度。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "c", + "desc": "canvas对象。" + }, + { + "type": "const wchar_t*", + "name": "str", + "desc": "字符串。" + }, + { + "type": "uint32_t", + "name": "nr", + "desc": "字符数。" + }, + { + "type": "xy_t", + "name": "x", + "desc": "x坐标。" + }, + { + "type": "xy_t", + "name": "y", + "desc": "y坐标。" + } + ], + "annotation": {}, + "desc": "绘制文本。", + "name": "canvas_draw_text", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "c", + "desc": "canvas对象。" + }, + { + "type": "const char*", + "name": "str", + "desc": "字符串。" + }, + { + "type": "xy_t", + "name": "x", + "desc": "x坐标。" + }, + { + "type": "xy_t", + "name": "y", + "desc": "y坐标。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "绘制文本。\n\n> 供脚本语言使用。", + "name": "canvas_draw_utf8", + "alias": "canvas_draw_text", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "c", + "desc": "canvas对象。" + }, + { + "type": "const wchar_t*", + "name": "str", + "desc": "字符串。" + }, + { + "type": "uint32_t", + "name": "nr", + "desc": "字符数。" + }, + { + "type": "const rect_t*", + "name": "r", + "desc": "矩形区域。" + } + ], + "annotation": {}, + "desc": "绘制文本。", + "name": "canvas_draw_text_in_rect", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "c", + "desc": "canvas对象。" + }, + { + "type": "const wchar_t*", + "name": "str", + "desc": "字符串。" + }, + { + "type": "uint32_t", + "name": "nr", + "desc": "字符数。" + }, + { + "type": "const rect_t*", + "name": "r", + "desc": "矩形区域。" + }, + { + "type": "const char*", + "name": "bidi_type", + "desc": "类型。" + }, + { + "type": "bool_t", + "name": "ellipses", + "desc": "如果目标宽度不够,是否显示省略号。" + } + ], + "annotation": {}, + "desc": "绘制文本(支持Unicode Bidirectional Algorithm)。", + "name": "canvas_draw_text_bidi_in_rect", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "c", + "desc": "canvas对象。" + }, + { + "type": "const char*", + "name": "str", + "desc": "字符串。" + }, + { + "type": "const rect_t*", + "name": "r", + "desc": "矩形区域。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "绘制文本。\n\n> 供脚本语言使用。", + "name": "canvas_draw_utf8_in_rect", + "alias": "canvas_draw_text_in_rect", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "c", + "desc": "canvas对象。" + }, + { + "type": "bitmap_t*", + "name": "img", + "desc": "图片对象。" + }, + { + "type": "xy_t", + "name": "cx", + "desc": "中心点x坐标。" + }, + { + "type": "xy_t", + "name": "cy", + "desc": "中心点y坐标。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "绘制图标。", + "name": "canvas_draw_icon", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "c", + "desc": "canvas对象。" + }, + { + "type": "bitmap_t*", + "name": "img", + "desc": "图片对象。" + }, + { + "type": "const rect_t*", + "name": "src", + "desc": "源区域。" + }, + { + "type": "const rect_t*", + "name": "dst", + "desc": "目的区域。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "绘制图片。", + "name": "canvas_draw_image", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "c", + "desc": "canvas对象。" + }, + { + "type": "bitmap_t*", + "name": "img", + "desc": "图片对象。" + }, + { + "type": "image_draw_type_t", + "name": "draw_type", + "desc": "绘制类型。" + }, + { + "type": "const rect_t*", + "name": "dst", + "desc": "目的区域。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "绘制图片。", + "name": "canvas_draw_image_ex", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "c", + "desc": "canvas对象。" + }, + { + "type": "bitmap_t*", + "name": "img", + "desc": "图片对象。" + }, + { + "type": "image_draw_type_t", + "name": "draw_type", + "desc": "绘制类型。" + }, + { + "type": "const rect_t*", + "name": "src", + "desc": "源区域。" + }, + { + "type": "const rect_t*", + "name": "dst", + "desc": "目的区域。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "绘制图片。", + "name": "canvas_draw_image_ex2", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "c", + "desc": "canvas对象。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "获取vgcanvas对象。", + "name": "canvas_get_vgcanvas", + "return": { + "type": "vgcanvas_t*", + "desc": "返回vgcanvas对象。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "c", + "desc": "canvas对象。" + } + ], + "annotation": { + "cast": true, + "scriptable": true + }, + "desc": "转换为canvas对象(供脚本语言使用)。", + "name": "canvas_cast", + "return": { + "type": "canvas_t*", + "desc": "canvas对象。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "c", + "desc": "canvas对象。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "释放相关资源。", + "name": "canvas_reset", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "c", + "desc": "canvas对象。" + }, + { + "type": "bitmap_t*", + "name": "img", + "desc": "图片对象。" + }, + { + "type": "xy_t", + "name": "x", + "desc": "x坐标。" + }, + { + "type": "xy_t", + "name": "y", + "desc": "w坐标。" + } + ], + "annotation": {}, + "desc": "在指定位置画图。", + "name": "canvas_draw_image_at", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "c", + "desc": "canvas对象。" + }, + { + "type": "xy_t", + "name": "x1", + "desc": "起始点的x坐标。" + }, + { + "type": "xy_t", + "name": "y1", + "desc": "起始点的y坐标。" + }, + { + "type": "xy_t", + "name": "x2", + "desc": "结束点的x坐标。" + }, + { + "type": "xy_t", + "name": "y2", + "desc": "结束点的y坐标。" + } + ], + "annotation": {}, + "desc": "画直线。", + "name": "canvas_draw_line", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "c", + "desc": "canvas对象。" + }, + { + "type": "font_manager_t*", + "name": "font_manager", + "desc": "font_manager对象。" + } + ], + "annotation": {}, + "desc": "设置canvas的font_manager对象。", + "name": "canvas_set_font_manager", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "c", + "desc": "canvas对象。" + }, + { + "type": "assets_manager_t*", + "name": "assets_manager", + "desc": "assets_manager对象。" + } + ], + "annotation": {}, + "desc": "设置canvas的assets_manager对象。", + "name": "canvas_set_assets_manager", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "canvas", + "desc": "canvas对象。" + }, + { + "type": "float_t*", + "name": "ascent", + "desc": "用于返回ascent。" + }, + { + "type": "float_t*", + "name": "descent", + "desc": "用于返回descent。" + }, + { + "type": "float_t*", + "name": "line_hight", + "desc": "用于返回line height。" + } + ], + "annotation": {}, + "desc": "获取当前字体的度量信息。", + "name": "canvas_get_text_metrics", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "c", + "desc": "canvas对象。" + }, + { + "type": "const rect_t*", + "name": "dirty_rect", + "desc": "脏矩形。" + }, + { + "type": "lcd_draw_mode_t", + "name": "draw_mode", + "desc": "绘制模式。" + } + ], + "annotation": {}, + "desc": "绘制开始。", + "name": "canvas_begin_frame", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "c", + "desc": "canvas对象。" + }, + { + "type": "const rect_t*", + "name": "r", + "desc": "矩形。" + }, + { + "type": "const color_t*", + "name": "color", + "desc": "颜色。" + }, + { + "type": "uint32_t", + "name": "radius", + "desc": "圆角半径。" + } + ], + "annotation": {}, + "desc": "填充区域。", + "name": "canvas_fill_rounded_rect", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "c", + "desc": "canvas对象。" + }, + { + "type": "const rect_t*", + "name": "r", + "desc": "矩形。" + }, + { + "type": "const color_t*", + "name": "color", + "desc": "颜色。" + }, + { + "type": "uint32_t", + "name": "radius_tl", + "desc": "左上角圆角半径。" + }, + { + "type": "uint32_t", + "name": "radius_tr", + "desc": "右上角圆角半径。" + }, + { + "type": "uint32_t", + "name": "radius_bl", + "desc": "左下角圆角半径。" + }, + { + "type": "uint32_t", + "name": "radius_br", + "desc": "右下角圆角半径。" + } + ], + "annotation": {}, + "desc": "填充区域。\n半径半径小于等于2,则表示该角为直角,如果全部角都为直角则返回RET_FAIL。(如果全是直角,该函数效率没有canvas_fill_rect函数快)\n如果各个半径都不一样的话,就是会使用vg,如果不支持vg就会返回RET_FAIL(直角的情况除外)。", + "name": "canvas_fill_rounded_rect_ex", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "c", + "desc": "canvas对象。" + }, + { + "type": "const rect_t*", + "name": "r", + "desc": "矩形。" + }, + { + "type": "const color_t*", + "name": "color", + "desc": "颜色。" + }, + { + "type": "uint32_t", + "name": "radius", + "desc": "圆角半径。" + }, + { + "type": "uint32_t", + "name": "border_width", + "desc": "边宽。" + } + ], + "annotation": {}, + "desc": "绘制边框。", + "name": "canvas_stroke_rounded_rect", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "c", + "desc": "canvas对象。" + }, + { + "type": "const rect_t*", + "name": "r", + "desc": "矩形。" + }, + { + "type": "const color_t*", + "name": "color", + "desc": "颜色。" + }, + { + "type": "uint32_t", + "name": "radius_tl", + "desc": "左上角圆角半径。" + }, + { + "type": "uint32_t", + "name": "radius_tr", + "desc": "右上角圆角半径。" + }, + { + "type": "uint32_t", + "name": "radius_bl", + "desc": "左下角圆角半径。" + }, + { + "type": "uint32_t", + "name": "radius_br", + "desc": "右下角圆角半径。" + }, + { + "type": "uint32_t", + "name": "border_width", + "desc": "边宽。" + }, + { + "type": "uint32_t", + "name": "border_model", + "desc": "边框类型。" + } + ], + "annotation": {}, + "desc": "绘制边框。\n半径半径小于等于2,则表示该角为直角,如果全部角都为直角则返回RET_FAIL。(如果全是直角,该函数效率没有canvas_stroke_rect函数快)\n如果各个半径都不一样的话,就是会使用vg,如果不支持vg就会返回RET_FAIL(直角的情况除外)。", + "name": "canvas_stroke_rounded_rect_ex", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "canvas_t*", + "name": "c", + "desc": "canvas对象。" + } + ], + "annotation": {}, + "desc": "绘制结束。", + "name": "canvas_end_frame", "return": { "type": "ret_t", "desc": "返回RET_OK表示成功,否则表示失败。" @@ -45749,94 +37426,358 @@ "events": [], "properties": [ { - "name": "init_dir", - "desc": "初始文件夹。", + "name": "ox", + "desc": "x坐标偏移。", + "type": "xy_t", + "annotation": { + "readable": true, + "scriptable": true + } + }, + { + "name": "oy", + "desc": "y坐标偏移。", + "type": "xy_t", + "annotation": { + "readable": true, + "scriptable": true + } + }, + { + "name": "font_name", + "desc": "当前字体名称。", "type": "char*", "annotation": { - "set_prop": true, - "get_prop": true, "readable": true, - "persitent": true, - "design": true, "scriptable": true } }, { - "name": "filter", - "desc": "过滤规则。", - "type": "char*", + "name": "font_size", + "desc": "当前字体大小。", + "type": "uint16_t", "annotation": { - "set_prop": true, - "get_prop": true, "readable": true, - "persitent": true, - "design": true, "scriptable": true } }, { - "name": "ignore_hidden_files", - "desc": "是否忽略隐藏文件。", + "name": "global_alpha", + "desc": "当前全局alpha。", + "type": "uint8_t", + "annotation": { + "readable": true, + "scriptable": true + } + }, + { + "name": "clip_left", + "desc": "当前裁剪矩形的左边位置。", + "type": "xy_t", + "annotation": { + "readable": true + } + }, + { + "name": "clip_top", + "desc": "当前裁剪矩形的顶部位置。", + "type": "xy_t", + "annotation": { + "readable": true + } + }, + { + "name": "clip_right", + "desc": "当前裁剪矩形的右边位置。", + "type": "xy_t", + "annotation": { + "readable": true + } + }, + { + "name": "clip_bottom", + "desc": "当前裁剪矩形的底部位置。", + "type": "xy_t", + "annotation": { + "readable": true + } + }, + { + "name": "fps", + "desc": "当前的帧率。", + "type": "uint32_t", + "annotation": { + "readable": true + } + }, + { + "name": "show_fps", + "desc": "是否显示帧率。", "type": "bool_t", "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true + "readable": true } }, { - "name": "sort_ascending", - "desc": "是否为升序排序。", - "type": "bool_t", + "name": "text_align_v", + "desc": "文本垂直对齐方式。", + "type": "align_v_t", "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true + "readable": true } }, { - "name": "show_check_button", - "desc": "是否显示checkbutton。", - "type": "bool_t", + "name": "text_align_h", + "desc": "文本水平对齐方式。", + "type": "align_h_t", "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true + "readable": true } }, { - "name": "sort_by", - "desc": "排序方式。可选值(name, size, mtime, type)。", - "type": "char*", + "name": "lcd", + "desc": "lcd对象。", + "type": "lcd_t*", "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true + "readable": true + } + }, + { + "name": "font", + "desc": "字体对象。", + "type": "font_t*", + "annotation": { + "readable": true + } + }, + { + "name": "font_manager", + "desc": "字体管理器对象。", + "type": "font_manager_t*", + "annotation": { + "readable": true + } + }, + { + "name": "assets_manager", + "desc": "资源管理器对象。", + "type": "assets_manager_t*", + "annotation": { + "readable": true } } ], - "header": "file_browser/file_browser_view.h", - "desc": "文件管理/浏览/选择控件。\n\nfile\\_browser\\_view\\_t是[widget\\_t](widget_t.md)的子类控件,widget\\_t的函数均适用于file\\_browser\\_view\\_t控件。\n\n考虑到文件浏览器界面呈现的多样性,界面呈现工作完全有子控件来完成。\n\nfile\\_browser\\_view\\_t负责关联文件/文件夹数据到子控件上,子控件需要特定的规范命名。\n\n* 名为 \"cwd\" 的子控件用于显示当前路径。\n\n* 名为 \"selected_file\" 的子控件用于显示当前选择的文件。\n\n* 名为 \"file\" 的子控件用于显示文件项的模板控件。\n\n* 名为 \"folder\" 的子控件用于显示文件夹项的模板控件。\n\n* 名为 \"return_up\" 的子控件用于返回上一级文件夹的模板控件。\n\n* 名为 \"container\" 的子控件为容器控件,通常是scrollview。\n\n* 名为 \"name\" 的子控件用于显示文件和文件夹的名称(放在列表项目内)。\n\n* 名为 \"size\" 的子控件用于显示文件和文件夹的大小(放在列表项目内)。\n\n* 名为 \"mtime\" 的子控件用于显示文件和文件夹的修改时间(放在列表项目内)。\n\n* 名为 \"ctime\" 的子控件用于显示文件和文件夹的创建时间(放在列表项目内)。\n\n* 名为 \"icon\" 的子控件用于显示文件和文件夹的图标(放在列表项目内)。\n\n* 类型为 \"check_button\" 的子控件用于选择(放在列表项目内)。\n\n完整示例请参考:\n\nhttps://github.com/zlgopen/awtk/blob/master/design/default/ui/file_chooser_for_open.xml", - "name": "file_browser_view_t", - "parent": "widget_t", + "header": "base/canvas.h", + "desc": "提供基本的绘图功能和状态管理。", + "name": "canvas_t", "annotation": { - "scriptable": true, - "design": true, - "widget": true + "scriptable": true }, - "level": 2 + "level": 1 + }, + { + "params": [ + { + "type": "easing_type_t", + "name": "type", + "desc": "类型。" + } + ], + "annotation": { + "global": true + }, + "desc": "获取对应类型的操作函数。", + "name": "easing_get", + "return": { + "type": "easing_func_t", + "desc": "返回对应的操作函数地址。" + }, + "type": "method", + "header": "tkc/easing.h", + "level": 1 + }, + { + "type": "enum", + "desc": "缓动作动画常量定义。", + "consts": [ + { + "desc": "EASING_LINEAR。", + "name": "EASING_LINEAR" + }, + { + "desc": "EASING_QUADRATIC_IN", + "name": "EASING_QUADRATIC_IN" + }, + { + "desc": "EASING_QUADRATIC_OUT", + "name": "EASING_QUADRATIC_OUT" + }, + { + "desc": "EASING_QUADRATIC_INOUT", + "name": "EASING_QUADRATIC_INOUT" + }, + { + "desc": "EASING_CUBIC_IN", + "name": "EASING_CUBIC_IN" + }, + { + "desc": "EASING_CUBIC_OUT", + "name": "EASING_CUBIC_OUT" + }, + { + "desc": "EASING_SIN_IN", + "name": "EASING_SIN_IN" + }, + { + "desc": "EASING_SIN_OUT", + "name": "EASING_SIN_OUT" + }, + { + "desc": "EASING_SIN_OUT", + "name": "EASING_SIN_INOUT" + }, + { + "desc": "EASING_POW_IN", + "name": "EASING_POW_IN" + }, + { + "desc": "EASING_POW_OUT", + "name": "EASING_POW_OUT" + }, + { + "desc": "EASING_POW_INOUT", + "name": "EASING_POW_INOUT" + }, + { + "desc": "EASING_CIRCULAR_IN", + "name": "EASING_CIRCULAR_IN" + }, + { + "desc": "EASING_CIRCULAR_OUT", + "name": "EASING_CIRCULAR_OUT" + }, + { + "desc": "EASING_CIRCULAR_INOUT", + "name": "EASING_CIRCULAR_INOUT" + }, + { + "desc": "EASING_ELASTIC_IN", + "name": "EASING_ELASTIC_IN" + }, + { + "desc": "EASING_ELASTIC_OUT", + "name": "EASING_ELASTIC_OUT" + }, + { + "desc": "EASING_ELASTIC_INOUT", + "name": "EASING_ELASTIC_INOUT" + }, + { + "desc": "EASING_BACK_IN", + "name": "EASING_BACK_IN" + }, + { + "desc": "EASING_BACK_OUT", + "name": "EASING_BACK_OUT" + }, + { + "desc": "EASING_BACK_INOUT", + "name": "EASING_BACK_INOUT" + }, + { + "desc": "EASING_BOUNCE_IN", + "name": "EASING_BOUNCE_IN" + }, + { + "desc": "EASING_BOUNCE_OUT", + "name": "EASING_BOUNCE_OUT" + }, + { + "desc": "EASING_BOUNCE_INOUT", + "name": "EASING_BOUNCE_INOUT" + } + ], + "header": "tkc/easing.h", + "name": "easing_type_t", + "prefix": "EASING_", + "annotation": { + "scriptable": true + }, + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "type": "const char*", + "name": "filename", + "desc": "文件名。" + } + ], + "annotation": {}, + "desc": "打开动态链接库。", + "name": "tk_dl_open", + "return": { + "type": "tk_dl_t*", + "desc": "动态链接库对象。" + } + }, + { + "params": [ + { + "type": "tk_dl_t*", + "name": "dl", + "desc": "dl对象。" + }, + { + "type": "const char*", + "name": "name", + "desc": "函数名。" + } + ], + "annotation": {}, + "desc": "获取指定名称函数的地址。", + "name": "tk_dl_sym", + "return": { + "type": "void*", + "desc": "返回函数的地址。" + } + }, + { + "params": [ + { + "type": "tk_dl_t*", + "name": "dl", + "desc": "dl对象。" + } + ], + "annotation": {}, + "desc": "关闭dl对象。", + "name": "tk_dl_close", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [], + "annotation": {}, + "desc": "Show last error", + "name": "tk_dl_error", + "return": { + "type": "const char*", + "desc": "返回error message." + } + } + ], + "events": [], + "properties": [], + "header": "tkc/dl.h", + "desc": "动态链接库对象。", + "name": "tk_dl_t", + "level": 1 }, { "type": "class", @@ -45845,331 +37786,45 @@ "params": [], "annotation": { "constructor": true, - "scriptable": true + "scriptable": true, + "gc": true }, - "desc": "创建file_chooser对象", - "name": "file_chooser_create", + "desc": "创建date_time对象,并初始为当前日期和时间(一般供脚本语言中使用)。", + "name": "date_time_create", "return": { - "type": "file_chooser_t*", - "desc": "对象。" + "type": "date_time_t*", + "desc": "返回date_time对象。" } }, { "params": [ { - "type": "file_chooser_t*", - "name": "chooser", - "desc": "file_chooser对象。" - }, - { - "type": "const char*", - "name": "init_dir", - "desc": "初始目录" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置初始目录。", - "name": "file_chooser_set_init_dir", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "file_chooser_t*", - "name": "chooser", - "desc": "file_chooser对象。" - }, - { - "type": "const char*", - "name": "filter", - "desc": "过滤规则。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置过滤规则。\n> files_only 表示只列出文件,dir_only 表示只列出目录,其它表示只列出满足扩展名文件集合(如:.jpg.png.gif)。", - "name": "file_chooser_set_filter", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "file_chooser_t*", - "name": "chooser", - "desc": "file_chooser对象。" - } - ], - "annotation": { - "cast": true, - "scriptable": true - }, - "desc": "转换为file_chooser对象(供脚本语言使用)。", - "name": "file_chooser_cast", - "return": { - "type": "file_chooser_t*", - "desc": "对象。" - } - }, - { - "params": [ - { - "type": "file_chooser_t*", - "name": "chooser", - "desc": "file_chooser对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "为了保存而选择文件。", - "name": "file_chooser_choose_file_for_save", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "file_chooser_t*", - "name": "chooser", - "desc": "file_chooser对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "为了打开而选择文件。", - "name": "file_chooser_choose_file_for_open", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "file_chooser_t*", - "name": "chooser", - "desc": "file_chooser对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "选择目录。", - "name": "file_chooser_choose_folder", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "file_chooser_t*", - "name": "chooser", - "desc": "file_chooser对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取目录。", - "name": "file_chooser_get_dir", - "return": { - "type": "const char*", - "desc": "返回选择的目录。" - } - }, - { - "params": [ - { - "type": "file_chooser_t*", - "name": "chooser", - "desc": "file_chooser对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取文件名。", - "name": "file_chooser_get_filename", - "return": { - "type": "const char*", - "desc": "返回选择的文件名。" - } - }, - { - "params": [ - { - "type": "file_chooser_t*", - "name": "chooser", - "desc": "file_chooser对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "用户是否取消了选择。", - "name": "file_chooser_is_aborted", - "return": { - "type": "bool_t", - "desc": "返回用户是否取消了选择。" - } - }, - { - "params": [ - { - "type": "file_chooser_t*", - "name": "chooser", - "desc": "file_chooser对象。" + "type": "date_time_t*", + "name": "dt", + "desc": "date_time对象。" } ], "annotation": {}, - "desc": "销毁file_chooser对象(选择完成后自动调用)。", - "name": "file_chooser_destroy", + "desc": "初始为当前日期和时间。", + "name": "date_time_init", "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [ - { - "name": "init_dir", - "desc": "初始目录。", - "type": "char*" - }, - { - "name": "filter", - "desc": "过滤规则。", - "type": "char*" - }, - { - "name": "on_done", - "desc": "接受结果的回调函数。", - "type": "tk_on_done_t" - }, - { - "name": "on_done_ctx", - "desc": "用户数据。", - "type": "void*" - }, - { - "name": "cwd", - "desc": "当前路径。", - "type": "str_t" - }, - { - "name": "filename;", - "desc": "当前选择的文件。", - "type": "str_t" - }, - { - "name": "aborted", - "desc": "是否取消了选择。", - "type": "bool_t" - } - ], - "header": "file_browser/file_chooser.h", - "desc": "文件/目录选择器", - "name": "file_chooser_t", - "annotation": { - "scriptable": true - }, - "parent": "emitter_t", - "level": 2 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "widget_t*", - "name": "parent", - "desc": "父控件" - }, - { - "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": { - "constructor": true, - "scriptable": true - }, - "desc": "创建guage_pointer对象", - "name": "guage_pointer_create", - "return": { - "type": "widget_t*", - "desc": "对象。" + "type": "date_time_t*", + "desc": "返回date_time对象。" } }, { "params": [ { - "type": "widget_t*", - "name": "widget", - "desc": "guage_pointer对象。" - } - ], - "annotation": { - "cast": true, - "scriptable": true - }, - "desc": "转换为guage_pointer对象(供脚本语言使用)。", - "name": "guage_pointer_cast", - "return": { - "type": "widget_t*", - "desc": "guage_pointer对象。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "int32_t", - "name": "angle", - "desc": "指针角度。" + "type": "date_time_t*", + "name": "dt", + "desc": "date_time对象。" } ], "annotation": { "scriptable": true }, - "desc": "设置指针角度。12点钟方向为0度,顺时钟方向为正,单位为度。", - "name": "guage_pointer_set_angle", + "desc": "设置当前时间。", + "name": "date_time_set", "return": { "type": "ret_t", "desc": "返回RET_OK表示成功,否则表示失败。" @@ -46178,21 +37833,21 @@ { "params": [ { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" + "type": "date_time_t*", + "name": "dt", + "desc": "date_time对象。" }, { - "type": "const char*", - "name": "image", - "desc": "指针的图片。" + "type": "uint64_t", + "name": "time", + "desc": "时间。" } ], "annotation": { "scriptable": true }, - "desc": "设置指针的图片。", - "name": "guage_pointer_set_image", + "desc": "从time转换而来。", + "name": "date_time_from_time", "return": { "type": "ret_t", "desc": "返回RET_OK表示成功,否则表示失败。" @@ -46201,177 +37856,21 @@ { "params": [ { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" + "type": "date_time_t*", + "name": "dt", + "desc": "date_time对象。" }, { - "type": "const char*", - "name": "anchor_x", - "desc": "指针的锚点坐标x。(后面加上px为像素点,不加px为相对百分比坐标)" - }, - { - "type": "const char*", - "name": "anchor_y", - "desc": "指针的锚点坐标y。(后面加上px为像素点,不加px为相对百分比坐标)" + "type": "int64_t", + "name": "delta", + "desc": "偏移量(s)。" } ], "annotation": { "scriptable": true }, - "desc": "设置指针的旋转锚点。", - "name": "guage_pointer_set_anchor", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [ - { - "name": "angle", - "desc": "指针角度。12点钟方向为0度,顺时钟方向为正,单位为度。", - "type": "int32_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "image", - "desc": "指针图片。\n\n图片须垂直向上,图片的中心点为旋转方向。", - "type": "char*", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "anchor_x", - "desc": "图片旋转锚点x坐标。(后面加上px为像素点,不加px为相对百分比坐标0.0f到1.0f)", - "type": "char*", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "anchor_y", - "desc": "图片旋转锚点x坐标。(后面加上px为像素点,不加px为相对百分比坐标0.0f到1.0f)", - "type": "char*", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - } - ], - "header": "guage/guage_pointer.h", - "desc": "仪表指针控件。\n\n仪表指针就是一张旋转的图片,图片可以是普通图片也可以是SVG图片。\n\n在嵌入式平台上,对于旋转的图片,SVG图片的效率比位图高数倍,所以推荐使用SVG图片。\n\nguage\\_pointer\\_t是[widget\\_t](widget_t.md)的子类控件,widget\\_t的函数均适用于guage\\_pointer\\_t控件。\n\n在xml中使用\"guage\\_pointer\"标签创建仪表指针控件。如:\n\n```xml\n\n```\n\n> 更多用法请参考:\n[guage.xml](https://github.com/zlgopen/awtk/blob/master/design/default/ui/guage.xml)\n\n在c代码中使用函数guage\\_pointer\\_create创建仪表指针控件。如:\n\n```c\nwidget_t* guage_pointer = guage_pointer_create(guage, 10, 10, 100, 30);\nguage_pointer_set_image(guage_pointer, \"guage_pointer\");\n```\n\n> 创建之后,需要用guage\\_pointer\\_set\\_image设置仪表指针图片。", - "name": "guage_pointer_t", - "parent": "widget_t", - "annotation": { - "scriptable": true, - "design": true, - "widget": true - }, - "level": 2 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "widget_t*", - "name": "parent", - "desc": "父控件" - }, - { - "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": { - "constructor": true, - "scriptable": true - }, - "desc": "创建guage对象", - "name": "guage_create", - "return": { - "type": "widget_t*", - "desc": "对象。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "guage对象。" - } - ], - "annotation": { - "cast": true, - "scriptable": true - }, - "desc": "转换为guage对象(供脚本语言使用)。", - "name": "guage_cast", - "return": { - "type": "widget_t*", - "desc": "guage对象。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "image对象。" - }, - { - "type": "char*", - "name": "name", - "desc": "图片名称,该图片必须存在于资源管理器。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置背景图片的名称。", - "name": "guage_set_image", + "desc": "加上一个偏移量(s)。", + "name": "date_time_add_delta", "return": { "type": "ret_t", "desc": "返回RET_OK表示成功,否则表示失败。" @@ -46379,575 +37878,318 @@ }, { "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "image对象。" - }, - { - "type": "image_draw_type_t", - "name": "draw_type", - "desc": "显示方式。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置图片的显示方式。\n\n> 绘制方式的属性值和枚举值:\n[image\\_draw\\_type\\_name\\_value](https://github.com/zlgopen/awtk/blob/master/src/base/enums.c#L98)", - "name": "guage_set_draw_type", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [ - { - "name": "image", - "desc": "背景图片。", - "type": "char*", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "draw_type", - "desc": "图片的绘制方式。", - "type": "image_draw_type_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - } - ], - "header": "guage/guage.h", - "desc": "表盘控件。\n\n表盘控件就是一张图片。\n\nguage\\_t是[widget\\_t](widget_t.md)的子类控件,widget\\_t的函数均适用于guage\\_t控件。\n\n在xml中使用\"guage\"标签创建表盘控件。如:\n\n```xml\n\n```\n\n> 更多用法请参考:\n[guage.xml](https://github.com/zlgopen/awtk/blob/master/design/default/ui/guage.xml)\n\n在c代码中使用函数guage\\_create创建表盘控件。如:\n\n```c\nwidget_t* guage = guage_create(win, 10, 10, 200, 200);\nguage_set_image(guage, \"guage_bg\");\n```\n\n可用通过style来设置控件的显示风格,如背景和边框等。如:\n\n```xml\n\n\n\n```\n\n> 更多用法请参考:\n[theme\ndefault](https://github.com/zlgopen/awtk/blob/master/design/default/styles/default.xml)", - "name": "guage_t", - "parent": "widget_t", - "annotation": { - "scriptable": true, - "design": true, - "widget": true - }, - "level": 2 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "widget_t*", - "name": "parent", - "desc": "父控件" - }, - { - "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": { - "constructor": true, - "scriptable": true - }, - "desc": "创建image_animation对象", - "name": "image_animation_create", - "return": { - "type": "widget_t*", - "desc": "对象。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "image_animation对象。" - }, - { - "type": "bool_t", - "name": "loop", - "desc": "是否循环播放。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置是否循环播放。", - "name": "image_animation_set_loop", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "image_animation对象。" - }, - { - "type": "const char*", - "name": "image", - "desc": "图片前缀。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置图片前缀。", - "name": "image_animation_set_image", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "image_animation对象。" - }, { "type": "uint32_t", - "name": "interval", - "desc": "间隔时间(毫秒)。" + "name": "year", + "desc": "年份。" } ], "annotation": { - "scriptable": true + "scriptable": true, + "static": true }, - "desc": "设置播放间隔时间。", - "name": "image_animation_set_interval", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "image_animation对象。" - }, - { - "type": "uint32_t", - "name": "delay", - "desc": "延迟播放时间(毫秒)。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置延迟播放时间(仅适用于自动播放)。", - "name": "image_animation_set_delay", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "image_animation对象。" - }, - { - "type": "bool_t", - "name": "auto_play", - "desc": "是否自动播放。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置是否自动播放。", - "name": "image_animation_set_auto_play", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "image_animation对象。" - }, - { - "type": "const char*", - "name": "sequence", - "desc": "播放序列。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置播放序列。比如image为\"fire\",sequence为\"12223\", 将依次播放\"fire1\", \"fire2\", \"fire2\", \"fire2\",\n\"fire3\"。", - "name": "image_animation_set_sequence", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "image_animation对象。" - }, - { - "type": "uint32_t", - "name": "start_index", - "desc": "图片起始序数。" - }, - { - "type": "uint32_t", - "name": "end_index", - "desc": "图片结束序数。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置播放序列。比如image为\"fire\",start_index为0, end_index为99, 将依次播放\"fire0\", ...,\n\"fire99\"。\n\n若指定的图片不存在,则重复上一张图片。", - "name": "image_animation_set_range_sequence", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "image_animation对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "播放。", - "name": "image_animation_play", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "image_animation对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "停止(并重置index为-1)。", - "name": "image_animation_stop", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "image_animation对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "暂停。", - "name": "image_animation_pause", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "image_animation对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "手动切换到下一张图片。", - "name": "image_animation_next", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "image_animation对象。" - }, - { - "type": "const char*", - "name": "format", - "desc": "格式。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置生成图片名的格式。\n\nXXX:生成图片名时,第一个参数是图片名前缀,第二个是序数,只能在此前提下设置格式。\n\n```\nconst char* format = image_animation->format ? image_animation->format : \"%s%d\";\ntk_snprintf(name, TK_NAME_LEN, format, image_animation->image, image_animation->index);\n```", - "name": "image_animation_set_format", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "image_animation对象。" - }, - { - "type": "bool_t", - "name": "unload_after_paint", - "desc": "是否绘制完成后unload图片。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置绘制完成后unload图片,以释放内存空间。", - "name": "image_animation_set_unload_after_paint", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "image_animation对象。" - } - ], - "annotation": { - "cast": true, - "scriptable": true - }, - "desc": "转换为image_animation对象(供脚本语言使用)。", - "name": "image_animation_cast", - "return": { - "type": "widget_t*", - "desc": "image_animation对象。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "image_animation对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "判断是否在播放。", - "name": "image_animation_is_playing", + "desc": "是否是闰年。", + "name": "date_time_is_leap", "return": { "type": "bool_t", "desc": "返回TRUE表示是,否则表示否。" } + }, + { + "params": [ + { + "type": "uint32_t", + "name": "year", + "desc": "年份。" + }, + { + "type": "uint32_t", + "name": "montn", + "desc": "月份(1-12)。" + } + ], + "annotation": { + "scriptable": true, + "static": true + }, + "desc": "获取指定年份月份的天数。", + "name": "date_time_get_days", + "return": { + "type": "int32_t", + "desc": "返回大于0表示天数,否则表示失败。" + } + }, + { + "params": [ + { + "type": "uint32_t", + "name": "year", + "desc": "年份。" + }, + { + "type": "uint32_t", + "name": "montn", + "desc": "月份(1-12)。" + }, + { + "type": "uint32_t", + "name": "day", + "desc": "日(1-31)。" + } + ], + "annotation": { + "scriptable": true, + "static": true + }, + "desc": "获取指定日期是周几(0-6, Sunday = 0)。。", + "name": "date_time_get_wday", + "return": { + "type": "int32_t", + "desc": "返回大于等于0表示周几(0-6),否则表示失败。" + } + }, + { + "params": [ + { + "type": "uint32_t", + "name": "montn", + "desc": "月份(1-12)。" + } + ], + "annotation": { + "scriptable": true, + "static": true + }, + "desc": "获取指定月份的英文名称(简写)。", + "name": "date_time_get_month_name", + "return": { + "type": "const char*", + "desc": "返回指定月份的英文名称(简写)。" + } + }, + { + "params": [ + { + "type": "uint32_t", + "name": "wday", + "desc": "星期几(0-6, Sunday = 0)。" + } + ], + "annotation": { + "scriptable": true, + "static": true + }, + "desc": "获取周几的英文名称(简写)。", + "name": "date_time_get_wday_name", + "return": { + "type": "const char*", + "desc": "返回指定周几的英文名称(简写)。" + } + }, + { + "params": [ + { + "type": "date_time_t*", + "name": "dt", + "desc": "date_time对象。" + } + ], + "annotation": { + "deconstructor": true, + "scriptable": true, + "gc": true + }, + "desc": "销毁date_time对象(一般供脚本语言中使用)。", + "name": "date_time_destroy", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "date_time_vtable_t", + "name": "vt", + "desc": "日期和时间的相关函数的实现。" + } + ], + "annotation": {}, + "desc": "时间日期全局初始化。\n\n> 嵌入式平台需要提供并设置获取当前日期和时间的函数,否则相关的功能(如时钟控件)将无法正常工作。", + "name": "date_time_global_init_ex", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } } ], "events": [], "properties": [ { - "name": "image", - "desc": "图片名称的前缀。", - "type": "char*", + "name": "second", + "desc": "秒(0 - 59)。", + "type": "int32_t", "annotation": { - "set_prop": true, - "get_prop": true, "readable": true, - "persitent": true, - "design": true, "scriptable": true } }, { - "name": "sequence", - "desc": "播放的序列,字符可选值为数字和英文大小写字母,字符可以重复。如:0123456789或者123123abcd。", - "type": "char*", + "name": "minute", + "desc": "分(0 - 59)。", + "type": "int32_t", "annotation": { - "set_prop": true, - "get_prop": true, "readable": true, - "persitent": true, - "design": true, "scriptable": true } }, { - "name": "start_index", - "desc": "图片起始序数。", - "type": "uint32_t", + "name": "hour", + "desc": "时(0 - 23)。", + "type": "int32_t", "annotation": { - "set_prop": true, - "get_prop": true, "readable": true, - "persitent": true, - "design": true, "scriptable": true } }, { - "name": "end_index", - "desc": "图片结束序数。", - "type": "uint32_t", + "name": "day", + "desc": "日(1-31)。", + "type": "int32_t", "annotation": { - "set_prop": true, - "get_prop": true, "readable": true, - "persitent": true, - "design": true, "scriptable": true } }, { - "name": "loop", - "desc": "是否循环播放。", - "type": "bool_t", + "name": "wday", + "desc": "星期几(0-6, Sunday = 0)。", + "type": "int32_t", "annotation": { - "set_prop": true, - "get_prop": true, "readable": true, - "persitent": true, - "design": true, "scriptable": true } }, { - "name": "auto_play", - "desc": "是否自动播放。", - "type": "bool_t", + "name": "month", + "desc": "月(1-12)。", + "type": "int32_t", "annotation": { - "set_prop": true, - "get_prop": true, "readable": true, - "persitent": true, - "design": true, "scriptable": true } }, { - "name": "unload_after_paint", - "desc": "绘制完成后unload图片,以释放内存空间。", - "type": "bool_t", + "name": "year", + "desc": "年。", + "type": "int32_t", "annotation": { - "set_prop": true, - "get_prop": true, "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "format", - "desc": "索引到图片名转换时的格式,缺省为\"%s%d\"。", - "type": "char*", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "interval", - "desc": "每张图片播放的时间(毫秒)。", - "type": "uint32_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "delay", - "desc": "自动播放时延迟播放的时间(毫秒)。", - "type": "uint32_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, "scriptable": true } } ], - "header": "image_animation/image_animation.h", - "desc": "图片动画控件,指定一个图片前缀,依次显示指定序列的图片,从而形成动画效果。\n\n图片序列可以用sequence指定,也可以用start\\_index和end\\_index指定一个范围。\n\nimage\\_animation\\_t是[widget\\_t](widget_t.md)的子类控件,widget\\_t的函数均适用于image\\_animation\\_t控件。\n\n在xml中使用\"image\\_animation\"标签创建图片动画控件。如:\n\n```xml\n\n```\n\n> 更多用法请参考:\n[image_animation.xml](https://github.com/zlgopen/awtk/blob/master/design/default/ui/image_animation.xml)\n\n在c代码中使用函数image\\_animation\\_create创建图片动画控件。如:\n\n```c\nimage_animation = image_animation_create(win, 10, 10, 200, 200);\nimage_animation_set_image(image_animation, \"ani\");\nimage_animation_set_interval(image_animation, 50);\nimage_animation_set_range_sequence(image_animation, 1, 9);\nimage_animation_play(image_animation);\n```\n\n> 完整示例请参考:\n[image_animation\ndemo](https://github.com/zlgopen/awtk-c-demos/blob/master/demos/image_animation.c)\n\n可用通过style来设置控件的显示风格,如背景颜色和边框等等,不过一般情况并不需要。", - "name": "image_animation_t", - "parent": "widget_t", + "header": "tkc/date_time.h", + "desc": "日期时间。\n\n> 在嵌入式平台中,在系统初始时,需要调用date\\_time\\_global\\_init设置实际获取/设置系统时间的函数。", + "name": "date_time_t", "annotation": { - "scriptable": true, - "design": true, - "widget": true + "scriptable": true }, - "level": 2 + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [], + "annotation": {}, + "desc": "创建缺省的资源加载器。", + "name": "asset_loader_create", + "return": { + "type": "asset_loader_t*", + "desc": "返回loader对象。" + } + }, + { + "params": [ + { + "type": "asset_loader_t*", + "name": "loader", + "desc": "loader对象。" + }, + { + "type": "uint16_t", + "name": "type", + "desc": "资源类型。" + }, + { + "type": "uint16_t", + "name": "subtype", + "desc": "资源子类型。" + }, + { + "type": "const char*", + "name": "path", + "desc": "路径。" + }, + { + "type": "const char*", + "name": "name", + "desc": "名称。" + } + ], + "annotation": {}, + "desc": "加载指定的资源。", + "name": "asset_loader_load", + "return": { + "type": "asset_info_t*", + "desc": "返回资源对象(由调用者销毁)。" + } + }, + { + "params": [ + { + "type": "asset_loader_t*", + "name": "loader", + "desc": "loader对象。" + }, + { + "type": "const char*", + "name": "path", + "desc": "资源是路径。" + } + ], + "annotation": {}, + "desc": "判断指定资源是否存在。\n。", + "name": "asset_loader_exist", + "return": { + "type": "bool_t", + "desc": "返回TRUE表示存在,否则不存在。" + } + }, + { + "params": [ + { + "type": "asset_loader_t*", + "name": "loader", + "desc": "loader对象。" + } + ], + "annotation": {}, + "desc": "销毁loader对象。", + "name": "asset_loader_destroy", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + } + ], + "events": [], + "properties": [], + "header": "base/asset_loader.h", + "desc": "资源加载器接口。", + "name": "asset_loader_t", + "level": 1 }, { "type": "class", @@ -46955,302 +38197,3028 @@ { "params": [ { - "type": "widget_t*", - "name": "parent", - "desc": "父控件" + "type": "data_writer_t*", + "name": "writer", + "desc": "writer对象。" }, { - "type": "xy_t", - "name": "x", - "desc": "x坐标" + "type": "uint64_t", + "name": "offset", + "desc": "偏移量。" }, { - "type": "xy_t", - "name": "y", - "desc": "y坐标" + "type": "const void*", + "name": "data", + "desc": "数据缓冲区。" }, { - "type": "wh_t", - "name": "w", - "desc": "宽度" + "type": "uint32_t", + "name": "size", + "desc": "数据长度。" + } + ], + "annotation": {}, + "desc": "在指定位置写入数据。", + "name": "data_writer_write", + "return": { + "type": "int32_t", + "desc": "返回实际读取数据的长度。" + } + }, + { + "params": [ + { + "type": "data_writer_t*", + "name": "writer", + "desc": "writer对象。" + } + ], + "annotation": {}, + "desc": "销毁writer对象。", + "name": "data_writer_destroy", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + } + ], + "events": [], + "properties": [], + "header": "tkc/data_writer.h", + "desc": "数据写入接口。\n\n>对可写的媒介,如内存、文件、flash和其它媒介提供一个统一的写入接口。", + "name": "data_writer_t", + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [], + "annotation": { + "constructor": true + }, + "desc": "获取缺省的data writer工厂对象。", + "name": "data_writer_factory", + "return": { + "type": "data_writer_factory_t*", + "desc": "返回data writer工厂对象。" + } + }, + { + "params": [ + { + "type": "data_writer_factory_t*", + "name": "factory", + "desc": "data writer工厂对象。" + } + ], + "annotation": {}, + "desc": "设置缺省的data writer工厂对象。", + "name": "data_writer_factory_set", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [], + "annotation": { + "constructor": true + }, + "desc": "创建data writer工厂对象。", + "name": "data_writer_factory_create", + "return": { + "type": "data_writer_factory_t*", + "desc": "返回data writer工厂对象。" + } + }, + { + "params": [ + { + "type": "data_writer_factory_t*", + "name": "factory", + "desc": "writer工厂对象。" }, { - "type": "wh_t", - "name": "h", - "desc": "高度" + "type": "const char*", + "name": "protocol", + "desc": "协议(如file)。" + }, + { + "type": "data_writer_create_t", + "name": "create", + "desc": "data writer创建函数。" + } + ], + "annotation": {}, + "desc": "注册data writer创建函数。", + "name": "data_writer_factory_register", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "data_writer_factory_t*", + "name": "factory", + "desc": "data writer工厂对象。" + }, + { + "type": "const char*", + "name": "url", + "desc": "URL。" + } + ], + "annotation": { + "constructor": true + }, + "desc": "创建指定类型的data writer对象。", + "name": "data_writer_factory_create_writer", + "return": { + "type": "data_writer_t*", + "desc": "返回data writer对象。" + } + }, + { + "params": [ + { + "type": "data_writer_factory_t*", + "name": "factory", + "desc": "data writer工厂对象。" + } + ], + "annotation": {}, + "desc": "析构并释放data writer工厂对象。", + "name": "data_writer_factory_destroy", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + } + ], + "events": [], + "properties": [], + "header": "tkc/data_writer_factory.h", + "desc": "data writer工厂。", + "name": "data_writer_factory_t", + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "type": "data_reader_t*", + "name": "reader", + "desc": "reader对象。" + }, + { + "type": "uint64_t", + "name": "offset", + "desc": "偏移量。" + }, + { + "type": "void*", + "name": "data", + "desc": "用于读取数据的缓冲区。" + }, + { + "type": "uint32_t", + "name": "size", + "desc": "最大读取数据长度。" + } + ], + "annotation": {}, + "desc": "在指定位置读取数据。", + "name": "data_reader_read", + "return": { + "type": "int32_t", + "desc": "返回实际读取数据的长度。" + } + }, + { + "params": [ + { + "type": "data_reader_t*", + "name": "reader", + "desc": "reader对象。" + } + ], + "annotation": {}, + "desc": "获取数据长度。", + "name": "data_reader_get_size", + "return": { + "type": "uint64_t", + "desc": "返回数据长度。" + } + }, + { + "params": [ + { + "type": "data_reader_t*", + "name": "reader", + "desc": "reader对象。" + } + ], + "annotation": {}, + "desc": "销毁reader对象。", + "name": "data_reader_destroy", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "const char*", + "name": "url", + "desc": "URL。" + }, + { + "type": "uint32_t*", + "name": "size", + "desc": "返回数据长度。" + } + ], + "annotation": {}, + "desc": "从指定的URL读取全部数据。", + "name": "data_reader_read_all", + "return": { + "type": "void*", + "desc": "返回全部数据,调用者需要调用TKMEM_FREE释放返回值。" + } + } + ], + "events": [], + "properties": [], + "header": "tkc/data_reader.h", + "desc": "数据读取接口。\n\n>对可读的媒介,如内存、文件、flash、资源和其它媒介提供一个统一的读取接口。", + "name": "data_reader_t", + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [], + "annotation": { + "constructor": true + }, + "desc": "获取缺省的data reader工厂对象。", + "name": "data_reader_factory", + "return": { + "type": "data_reader_factory_t*", + "desc": "返回data reader工厂对象。" + } + }, + { + "params": [ + { + "type": "data_reader_factory_t*", + "name": "factory", + "desc": "data reader工厂对象。" + } + ], + "annotation": {}, + "desc": "设置缺省的data reader工厂对象。", + "name": "data_reader_factory_set", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [], + "annotation": { + "constructor": true + }, + "desc": "创建data reader工厂对象。", + "name": "data_reader_factory_create", + "return": { + "type": "data_reader_factory_t*", + "desc": "返回data reader工厂对象。" + } + }, + { + "params": [ + { + "type": "data_reader_factory_t*", + "name": "factory", + "desc": "reader工厂对象。" + }, + { + "type": "const char*", + "name": "protocol", + "desc": "协议(如file)。" + }, + { + "type": "data_reader_create_t", + "name": "create", + "desc": "data reader创建函数。" + } + ], + "annotation": {}, + "desc": "注册data reader创建函数。", + "name": "data_reader_factory_register", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "data_reader_factory_t*", + "name": "factory", + "desc": "data reader工厂对象。" + }, + { + "type": "const char*", + "name": "url", + "desc": "URL。" + } + ], + "annotation": { + "constructor": true + }, + "desc": "创建指定类型的data reader对象。", + "name": "data_reader_factory_create_reader", + "return": { + "type": "data_reader_t*", + "desc": "返回data reader对象。" + } + }, + { + "params": [ + { + "type": "data_reader_factory_t*", + "name": "factory", + "desc": "data reader工厂对象。" + } + ], + "annotation": {}, + "desc": "析构并释放data reader工厂对象。", + "name": "data_reader_factory_destroy", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + } + ], + "events": [], + "properties": [], + "header": "tkc/data_reader_factory.h", + "desc": "data reader工厂。", + "name": "data_reader_factory_t", + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "type": "uint32_t", + "name": "capacity", + "desc": "数组的初始容量。" + }, + { + "type": "tk_destroy_t", + "name": "destroy", + "desc": "元素销毁函数。" + }, + { + "type": "tk_compare_t", + "name": "compare", + "desc": "元素比较函数。" + } + ], + "annotation": { + "constructor": true + }, + "desc": "创建darray对象。", + "name": "darray_create", + "return": { + "type": "darray_t*", + "desc": "数组对象。" + } + }, + { + "params": [ + { + "type": "darray_t*", + "name": "darray", + "desc": "数组对象。" + }, + { + "type": "uint32_t*", + "name": "capacity", + "desc": "数组的初始容量。" + }, + { + "type": "tk_destroy_t", + "name": "destroy", + "desc": "元素销毁函数。" + }, + { + "type": "tk_compare_t", + "name": "compare", + "desc": "元素比较函数。" + } + ], + "annotation": {}, + "desc": "初始化darray对象。", + "name": "darray_init", + "return": { + "type": "darray_t*", + "desc": "数组对象。" + } + }, + { + "params": [ + { + "type": "darray_t*", + "name": "darray", + "desc": "数组对象。" + }, + { + "type": "void*", + "name": "ctx", + "desc": "比较函数的上下文。" + } + ], + "annotation": {}, + "desc": "查找第一个满足条件的元素。", + "name": "darray_find", + "return": { + "type": "void*", + "desc": "如果找到,返回满足条件的对象,否则返回NULL。" + } + }, + { + "params": [ + { + "type": "darray_t*", + "name": "darray", + "desc": "数组对象。" + }, + { + "type": "tk_compare_t", + "name": "cmp", + "desc": "比较函数,为NULL则使用内置的比较函数。" + }, + { + "type": "void*", + "name": "ctx", + "desc": "比较函数的上下文。" + } + ], + "annotation": {}, + "desc": "二分查找(确保数组有序)。", + "name": "darray_bsearch_index", + "return": { + "type": "int", + "desc": "如果找到,返回满足条件的对象的位置,否则返回-1。" + } + }, + { + "params": [ + { + "type": "darray_t*", + "name": "darray", + "desc": "数组对象。" + }, + { + "type": "tk_compare_t", + "name": "cmp", + "desc": "比较函数,为NULL则使用内置的比较函数。" + }, + { + "type": "void*", + "name": "ctx", + "desc": "比较函数的上下文。" + } + ], + "annotation": {}, + "desc": "二分查找(确保数组有序)。", + "name": "darray_bsearch", + "return": { + "type": "void*", + "desc": "如果找到,返回满足条件的对象,否则返回NULL。" + } + }, + { + "params": [ + { + "type": "darray_t*", + "name": "darray", + "desc": "数组对象。" + }, + { + "type": "uint32_t", + "name": "index", + "desc": "序数。" + } + ], + "annotation": {}, + "desc": "获取指定序数的元素。", + "name": "darray_get", + "return": { + "type": "void*", + "desc": "返回满足条件的对象,否则返回NULL。" + } + }, + { + "params": [ + { + "type": "darray_t*", + "name": "darray", + "desc": "数组对象。" + }, + { + "type": "void*", + "name": "ctx", + "desc": "比较函数的上下文。" + } + ], + "annotation": {}, + "desc": "查找第一个满足条件的元素,并返回位置。", + "name": "darray_find_index", + "return": { + "type": "int", + "desc": "如果找到,返回满足条件的对象的位置,否则返回-1。" + } + }, + { + "params": [ + { + "type": "darray_t*", + "name": "darray", + "desc": "数组对象。" + }, + { + "type": "void*", + "name": "ctx", + "desc": "比较函数的上下文。" + } + ], + "annotation": {}, + "desc": "删除第一个满足条件的元素。", + "name": "darray_remove", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "darray_t*", + "name": "darray", + "desc": "数组对象。" + }, + { + "type": "uint32_t", + "name": "index", + "desc": "位置序数。" + } + ], + "annotation": {}, + "desc": "删除指定位置的元素。", + "name": "darray_remove_index", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "darray_t*", + "name": "darray", + "desc": "数组对象。" + }, + { + "type": "tk_compare_t", + "name": "cmp", + "desc": "比较函数,为NULL则使用内置的比较函数。" + }, + { + "type": "void*", + "name": "ctx", + "desc": "比较函数的上下文。" + } + ], + "annotation": {}, + "desc": "删除全部满足条件的元素。", + "name": "darray_remove_all", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "darray_t*", + "name": "darray", + "desc": "数组对象。" + }, + { + "type": "tk_compare_t", + "name": "cmp", + "desc": "比较函数,为NULL则使用内置的比较函数。" + } + ], + "annotation": {}, + "desc": "排序。", + "name": "darray_sort", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "darray_t*", + "name": "darray", + "desc": "数组对象。" + }, + { + "type": "tk_compare_t", + "name": "cmp", + "desc": "比较函数,为NULL则使用内置的比较函数。" + }, + { + "type": "void*", + "name": "ctx", + "desc": "比较函数的上下文。" + }, + { + "type": "darray_t*", + "name": "matched", + "desc": "返回满足条件的元素。" + } + ], + "annotation": {}, + "desc": "查找全部满足条件的元素。\n\n```\ndarray_t matched;\ndarray_init(&matched, 0, NULL, NULL);\ndarray_find_all(darray, mycmp, myctx, &matched);\n...\ndarray_deinit(&matched);\n\n```", + "name": "darray_find_all", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "darray_t*", + "name": "darray", + "desc": "数组对象。" + } + ], + "annotation": {}, + "desc": "弹出最后一个元素。", + "name": "darray_pop", + "return": { + "type": "void*", + "desc": "成功返回最后一个元素,失败返回NULL。" + } + }, + { + "params": [ + { + "type": "darray_t*", + "name": "darray", + "desc": "数组对象。" + } + ], + "annotation": {}, + "desc": "返回最后一个元素。", + "name": "darray_tail", + "return": { + "type": "void*", + "desc": "成功返回最后一个元素,失败返回NULL。" + } + }, + { + "params": [ + { + "type": "darray_t*", + "name": "darray", + "desc": "数组对象。" + } + ], + "annotation": {}, + "desc": "返回第一个元素。", + "name": "darray_head", + "return": { + "type": "void*", + "desc": "成功返回最后一个元素,失败返回NULL。" + } + }, + { + "params": [ + { + "type": "darray_t*", + "name": "darray", + "desc": "数组对象。" + }, + { + "type": "void*", + "name": "data", + "desc": "待追加的元素。" + } + ], + "annotation": {}, + "desc": "在尾巴追加一个元素。", + "name": "darray_push", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "darray_t*", + "name": "darray", + "desc": "单向链表对象。" + }, + { + "type": "void*", + "name": "ctx", + "desc": "比较函数的上下文。" + } + ], + "annotation": {}, + "desc": "返回满足条件元素的个数。", + "name": "darray_count", + "return": { + "type": "int32_t", + "desc": "返回元素个数。" + } + }, + { + "params": [ + { + "type": "darray_t*", + "name": "darray", + "desc": "数组对象。" + } + ], + "annotation": {}, + "desc": "清除全部元素。", + "name": "darray_clear", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "darray_t*", + "name": "darray", + "desc": "数组对象。" + }, + { + "type": "tk_visit_t", + "name": "visit", + "desc": "遍历函数。" + }, + { + "type": "void*", + "name": "ctx", + "desc": "遍历函数的上下文。" + } + ], + "annotation": {}, + "desc": "遍历元素。", + "name": "darray_foreach", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "darray_t*", + "name": "darray", + "desc": "数组对象。" + } + ], + "annotation": {}, + "desc": "清除全部元素,并释放elms。", + "name": "darray_deinit", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "darray_t*", + "name": "darray", + "desc": "数组对象。" + } + ], + "annotation": {}, + "desc": "销毁darray对象。", + "name": "darray_destroy", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + } + ], + "events": [], + "properties": [ + { + "name": "size", + "desc": "数组中元素的个数。", + "type": "uint32_t", + "annotation": { + "readable": true + } + }, + { + "name": "capacity", + "desc": "数组的容量大小。", + "type": "uint32_t", + "annotation": { + "readable": true + } + }, + { + "name": "elms", + "desc": "数组中的元素。", + "type": "void**", + "annotation": { + "readable": true + } + }, + { + "name": "destroy", + "desc": "元素销毁函数。", + "type": "tk_destroy_t", + "annotation": { + "readable": true + } + }, + { + "name": "compare", + "desc": "元素比较函数。", + "type": "tk_compare_t", + "annotation": { + "readable": true + } + } + ], + "header": "tkc/darray.h", + "desc": "动态数组,根据元素个数动态调整数组的容量。\n\n用darray\\_init初始化时,用darray\\_deinit释放。如:\n\n```c\ndarray_t darray;\ndarray_init(&darray, 10, destroy, compare);\n...\ndarray_deinit(&darray);\n```\n\n用darray\\_create创建时,用darray\\_destroy销毁。如:\n\n```c\ndarray_t* darray = darray_create(10, destroy, compare);\n...\ndarray_destroy(darray);\n```", + "name": "darray_t", + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [], + "annotation": {}, + "desc": "创建cond。", + "name": "tk_cond_create", + "return": { + "type": "tk_cond_t*", + "desc": "cond对象。" + } + }, + { + "params": [ + { + "type": "tk_cond_t*", + "name": "cond", + "desc": "cond对象。" + }, + { + "type": "tk_mutex_t*", + "name": "mutex", + "desc": "mutex对象。" + } + ], + "annotation": {}, + "desc": "等待。", + "name": "tk_cond_wait", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "tk_cond_t*", + "name": "cond", + "desc": "cond对象。" + }, + { + "type": "tk_mutex_t*", + "name": "mutex", + "desc": "mutex对象。" + }, + { + "type": "uint32_t*", + "name": "timeout_ms", + "desc": "最长等待时间。" + } + ], + "annotation": {}, + "desc": "等待指定时间。", + "name": "tk_cond_wait_timeout", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "tk_cond_t*", + "name": "cond", + "desc": "cond对象。" + } + ], + "annotation": {}, + "desc": "唤醒。", + "name": "tk_cond_signal", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "tk_cond_t*", + "name": "cond", + "desc": "cond对象。" + } + ], + "annotation": {}, + "desc": "销毁cond对象。", + "name": "tk_cond_destroy", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + } + ], + "events": [], + "properties": [], + "header": "tkc/cond.h", + "desc": "条件变量。", + "name": "tk_cond_t", + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [], + "annotation": {}, + "desc": "创建cond_var。", + "name": "tk_cond_var_create", + "return": { + "type": "tk_cond_var_t*", + "desc": "cond_var对象。" + } + }, + { + "params": [ + { + "type": "tk_cond_var_t*", + "name": "cond_var", + "desc": "cond_var对象。" + }, + { + "type": "uint32_t*", + "name": "timeout_ms", + "desc": "最长等待时间。" + } + ], + "annotation": {}, + "desc": "等待。", + "name": "tk_cond_var_wait", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "tk_cond_var_t*", + "name": "cond_var", + "desc": "cond_var对象。" + } + ], + "annotation": {}, + "desc": "唤醒。", + "name": "tk_cond_var_awake", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "tk_cond_var_t*", + "name": "cond_var", + "desc": "cond_var对象。" + } + ], + "annotation": {}, + "desc": "销毁cond_var对象。", + "name": "tk_cond_var_destroy", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + } + ], + "events": [], + "properties": [], + "header": "tkc/cond_var.h", + "desc": "简化版的条件变量。", + "name": "tk_cond_var_t", + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "type": "compressor_t*", + "name": "compressor", + "desc": "compressor对象。" + }, + { + "type": "const void*", + "name": "data", + "desc": "待压缩的数据。" + }, + { + "type": "uint32_t", + "name": "size", + "desc": "数据长度。" + }, + { + "type": "wbuffer_t*", + "name": "out", + "desc": "压缩之后的数据。" + } + ], + "annotation": {}, + "desc": "压缩数据。", + "name": "compressor_compress", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "compressor_t*", + "name": "compressor", + "desc": "compressor对象。" + }, + { + "type": "const void*", + "name": "data", + "desc": "待解压的数据。" + }, + { + "type": "uint32_t", + "name": "size", + "desc": "数据长度。" + }, + { + "type": "wbuffer_t*", + "name": "out", + "desc": "解压之后的数据。" + } + ], + "annotation": {}, + "desc": "解压数据。", + "name": "compressor_uncompress", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "compressor_t*", + "name": "compressor", + "desc": "compressor对象。" + } + ], + "annotation": {}, + "desc": "销毁compressor对象。", + "name": "compressor_destroy", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + } + ], + "events": [], + "properties": [], + "header": "tkc/compressor.h", + "desc": "压缩解压接口。", + "name": "compressor_t", + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "type": "uint8_t", + "name": "r", + "desc": "红色。" + }, + { + "type": "uint8_t", + "name": "g", + "desc": "绿色。" + }, + { + "type": "uint8_t", + "name": "b", + "desc": "蓝色。" + }, + { + "type": "uint8_t", + "name": "a", + "desc": "alpha。" + } + ], + "annotation": { + "constructor": true + }, + "desc": "初始化颜色对象。", + "name": "color_init", + "return": { + "type": "color_t", + "desc": "颜色对象。" + } + }, + { + "params": [ + { + "type": "uint8_t", + "name": "r", + "desc": "红色通道。" + }, + { + "type": "uint8_t", + "name": "b", + "desc": "蓝色通道。" + }, + { + "type": "uint8_t", + "name": "g", + "desc": "绿色通道。" + }, + { + "type": "uint8_t", + "name": "a", + "desc": "alpha通道。" } ], "annotation": { "constructor": true, - "scriptable": true + "scriptable": true, + "gc": true }, - "desc": "创建image_value对象", - "name": "image_value_create", + "desc": "创建color对象。\n\n> 主要供脚本语言使用。", + "name": "color_create", "return": { - "type": "widget_t*", - "desc": "对象。" + "type": "color_t*", + "desc": "color对象。" } }, { "params": [ { - "type": "widget_t*", - "name": "widget", - "desc": "image_value对象。" + "type": "color_t*", + "name": "c", + "desc": "color对象。" }, { "type": "const char*", - "name": "image", - "desc": "图片前缀。" + "name": "str", + "desc": "css类似的颜色值。" } ], "annotation": { "scriptable": true }, - "desc": "设置图片前缀。", - "name": "image_value_set_image", + "desc": "创建color对象。\n\n> 主要供脚本语言使用。", + "name": "color_from_str", "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" + "type": "color_t*", + "desc": "color对象。" } }, { "params": [ { - "type": "widget_t*", - "name": "widget", - "desc": "image_value对象。" - }, - { - "type": "const char*", - "name": "format", - "desc": "格式。" + "type": "color_t*", + "name": "c", + "desc": "color对象。" } ], "annotation": { "scriptable": true }, - "desc": "设置格式。", - "name": "image_value_set_format", + "desc": "获取红色通道的值。\n\n> 主要供脚本语言使用。", + "name": "color_r", "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" + "type": "uint8_t", + "desc": "返回红色通道的值。" } }, { "params": [ { - "type": "widget_t*", - "name": "widget", - "desc": "image_value对象。" - }, - { - "type": "float_t", - "name": "delta", - "desc": "增量。" + "type": "color_t*", + "name": "c", + "desc": "color对象。" } ], "annotation": { "scriptable": true }, - "desc": "设置点击时加上的增量。", - "name": "image_value_set_click_add_delta", + "desc": "获取绿色通道的值。\n\n> 主要供脚本语言使用。", + "name": "color_g", "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" + "type": "uint8_t", + "desc": "返回绿色通道的值。" } }, { "params": [ { - "type": "widget_t*", - "name": "widget", - "desc": "image_value对象。" - }, - { - "type": "float_t", - "name": "value", - "desc": "值。" + "type": "color_t*", + "name": "c", + "desc": "color对象。" } ], "annotation": { "scriptable": true }, - "desc": "设置值。", - "name": "image_value_set_value", + "desc": "获取蓝色通道的值。\n\n> 主要供脚本语言使用。", + "name": "color_b", "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" + "type": "uint8_t", + "desc": "返回蓝色通道的值。" } }, { "params": [ { - "type": "widget_t*", - "name": "widget", - "desc": "image_min对象。" - }, - { - "type": "float_t", - "name": "min", - "desc": "最小值。" + "type": "color_t*", + "name": "c", + "desc": "color对象。" } ], "annotation": { "scriptable": true }, - "desc": "设置最小值。", - "name": "image_value_set_min", + "desc": "获取alpha通道的值。\n\n> 主要供脚本语言使用。", + "name": "color_a", "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" + "type": "uint8_t", + "desc": "返回alpha通道的值。" } }, { "params": [ { - "type": "widget_t*", - "name": "widget", - "desc": "image_max对象。" - }, - { - "type": "float_t", - "name": "max", - "desc": "最大值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置最大值。", - "name": "image_value_set_max", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "image_value对象。" + "type": "color_t*", + "name": "color", + "desc": "color对象。" } ], "annotation": { "cast": true, "scriptable": true }, - "desc": "转换为image_value对象(供脚本语言使用)。", - "name": "image_value_cast", + "desc": "转换为color对象。\n\n> 供脚本语言使用。", + "name": "color_cast", "return": { - "type": "widget_t*", - "desc": "image_value对象。" + "type": "color_t*", + "desc": "color对象。" + } + }, + { + "params": [ + { + "type": "color_t*", + "name": "c", + "desc": "color对象。" + } + ], + "annotation": { + "deconstructor": true, + "scriptable": true, + "gc": true + }, + "desc": "销毁color对象。\n> 主要供脚本语言使用。", + "name": "color_destroy", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "color_t*", + "name": "c", + "desc": "color对象。" + }, + { + "type": "char*", + "name": "str", + "desc": "内存。" + } + ], + "annotation": {}, + "desc": "获取16进制格式表示的颜色", + "name": "color_hex_str", + "return": { + "type": "char*", + "desc": "获取16进制字符串表示的颜色。" + } + }, + { + "params": [ + { + "type": "color_t*", + "name": "c", + "desc": "color对象。" + }, + { + "type": "char*", + "name": "str", + "desc": "内存。" + } + ], + "annotation": {}, + "desc": "获取rgba格式表示的颜色", + "name": "color_rgba_str", + "return": { + "type": "char*", + "desc": "获取rgba格式表示的颜色。" } } ], - "events": [ - { - "name": "EVT_VALUE_WILL_CHANGE", - "desc": "值即将改变事件(click_add_delta为非0时,点击触发)。", - "type": "event_t" - }, - { - "name": "EVT_VALUE_CHANGED", - "desc": "值改变事件(click_add_delta为非0时,点击触发)。", - "type": "event_t" - } - ], + "events": [], "properties": [ { - "name": "image", - "desc": "图片名称的前缀。", - "type": "char*", + "name": "rgba", + "desc": "颜色的RGBA值。", + "type": "rgba_t", "annotation": { - "set_prop": true, - "get_prop": true, "readable": true, - "persitent": true, - "design": true, - "scriptable": true + "writable": true } }, { - "name": "format", - "desc": "数值到字符串转换时的格式,缺省为\"%d\"。", - "type": "char*", + "name": "color", + "desc": "颜色的数值。", + "type": "uint32_t", "annotation": { - "set_prop": true, - "get_prop": true, "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "click_add_delta", - "desc": "点击时加上一个增量。", - "type": "float_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "value", - "desc": "值。", - "type": "float_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "min", - "desc": "最小值(如果设置了click\\_add\\_delta,到达最小值后回到最大值)。", - "type": "float_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "max", - "desc": "最大值(如果设置了click\\_add\\_delta,到达最大值后回到最小值)。", - "type": "float_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, + "writable": true, "scriptable": true } } ], - "header": "image_value/image_value.h", - "desc": "图片值控件。\n\n可以用图片来表示如电池电量、WIFI信号强度和其它各种数值的值。\n\n其原理如下:\n\n* 1.把value以format为格式转换成字符串。\n* 2.把每个字符与image(图片文件名前缀)映射成一个图片名。\n* 3.最后把这些图片显示出来。\n\n如果设置click\\_add\\_delta为非0,那么点击时自动增加指定的增量,值超过最大值时回到最小值,\n或者值超过最小值时回到最大值。\n\nimage\\_value\\_t是[widget\\_t](widget_t.md)的子类控件,widget\\_t的函数均适用于image\\_value\\_t控件。\n\n在xml中使用\"image\\_value\"标签创建图片值控件。如:\n\n```xml\n\n```\n\n> 更多用法请参考:\n[image\\_value](https://github.com/zlgopen/awtk/blob/master/design/default/ui/image_value.xml)\n\n在c代码中使用函数image\\_value\\_create创建图片值控件。如:\n\n```c\nimage_value = image_value_create(win, 10, 10, 200, 200);\nimage_value_set_image(image_value, \"num_\");\nimage_value_set_value(image_value, 100);\n```\n\n> 完整示例请参考:\n[image_value demo](https://github.com/zlgopen/awtk-c-demos/blob/master/demos/image_value.c)\n\n可用通过style来设置控件的显示风格,如背景颜色和边框等等,不过一般情况并不需要。", - "name": "image_value_t", - "parent": "widget_t", + "header": "tkc/color.h", + "desc": "颜色。", + "name": "color_t", "annotation": { - "scriptable": true, - "design": true, - "widget": true + "scriptable": true }, - "level": 2 + "level": 1 + }, + { + "type": "class", + "methods": [], + "events": [], + "properties": [ + { + "name": "r", + "desc": "红色。", + "type": "uint8_t", + "annotation": { + "readable": true, + "writable": true + } + }, + { + "name": "g", + "desc": "绿色。", + "type": "uint8_t", + "annotation": { + "readable": true, + "writable": true + } + }, + { + "name": "b", + "desc": "蓝色。", + "type": "uint8_t", + "annotation": { + "readable": true, + "writable": true + } + }, + { + "name": "a", + "desc": "alpha。", + "type": "uint8_t", + "annotation": { + "readable": true, + "writable": true + } + } + ], + "header": "tkc/color.h", + "desc": "颜色的四个通道。", + "name": "rgba_t", + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "type": "const char*", + "name": "color", + "desc": "字符串格式的颜色。" + } + ], + "annotation": { + "static": true + }, + "desc": "把字符串格式的颜色转换成color\\_t对象。\n\n目前支持下列格式:\n\n* 16进制格式。如:\"#112233\"\n* 颜色名称格式。如:\"green\"\n* rgb格式。如:\"rgb(11,22,33)\"\n* rgba格式。如:\"rgba(11,22,33,0.5)\"", + "name": "color_parse", + "return": { + "type": "void*", + "desc": "返回color_t对象。" + } + } + ], + "events": [], + "properties": [], + "header": "tkc/color_parser.h", + "desc": "颜色解析相关函数。\n\n示例:\n\n```c\ncolor_t c;\nc = color_parse(\"#112233\");\nc = color_parse(\"white\");\nc = color_parse(\"rgb(11,22,33)\");\nc = color_parse(\"rgba(11,22,33,0.5)\");\n```", + "name": "color_parser_t", + "annotation": { + "fake": true + }, + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "type": "rbuffer_t*", + "name": "rbuffer", + "desc": "rbuffer对象。" + }, + { + "type": "uint8_t*", + "name": "data", + "desc": "缓冲区。" + }, + { + "type": "uint16_t", + "name": "capacity", + "desc": "缓冲区的容量。" + } + ], + "annotation": { + "constructor": true + }, + "desc": "初始rbuffer对象。", + "name": "rbuffer_init", + "return": { + "type": "rbuffer_t*", + "desc": "rbuffer对象本身。" + } + }, + { + "params": [ + { + "type": "rbuffer_t*", + "name": "rbuffer", + "desc": "rbuffer对象。" + } + ], + "annotation": {}, + "desc": "判断是否还有数据可读。", + "name": "rbuffer_has_more", + "return": { + "type": "bool_t", + "desc": "返回TRUE表示还有数据可读,否则表示无数据可读。" + } + }, + { + "params": [ + { + "type": "rbuffer_t*", + "name": "rbuffer", + "desc": "rbuffer对象。" + }, + { + "type": "int32_t", + "name": "offset", + "desc": "跳过的偏移量,正数往前负数往回跳。" + } + ], + "annotation": {}, + "desc": "跳过指定的长度。", + "name": "rbuffer_skip", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "rbuffer_t*", + "name": "rbuffer", + "desc": "rbuffer对象。" + }, + { + "type": "uint8_t*", + "name": "value", + "desc": "返回读取的数据。" + } + ], + "annotation": {}, + "desc": "读取uint8数据。", + "name": "rbuffer_read_uint8", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "rbuffer_t*", + "name": "rbuffer", + "desc": "rbuffer对象。" + }, + { + "type": "uint16_t*", + "name": "value", + "desc": "读取的数据。" + } + ], + "annotation": {}, + "desc": "读取uint16数据。", + "name": "rbuffer_read_uint16", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "rbuffer_t*", + "name": "rbuffer", + "desc": "rbuffer对象。" + }, + { + "type": "uint32_t*", + "name": "value", + "desc": "返回读取的数据。" + } + ], + "annotation": {}, + "desc": "读取uint32数据。", + "name": "rbuffer_read_uint32", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "rbuffer_t*", + "name": "rbuffer", + "desc": "rbuffer对象。" + }, + { + "type": "float_t*", + "name": "value", + "desc": "返回读取的数据。" + } + ], + "annotation": {}, + "desc": "读取float数据。", + "name": "rbuffer_read_float", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "rbuffer_t*", + "name": "rbuffer", + "desc": "rbuffer对象。" + }, + { + "type": "void*", + "name": "data", + "desc": "返回读取的数据。" + }, + { + "type": "uint32_t", + "name": "size", + "desc": "读取的数据长度。" + } + ], + "annotation": {}, + "desc": "读取指定长度的二进制数据。", + "name": "rbuffer_read_binary", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "rbuffer_t*", + "name": "rbuffer", + "desc": "rbuffer对象。" + }, + { + "type": "char**", + "name": "str", + "desc": "返回字符串。" + } + ], + "annotation": {}, + "desc": "读取字符串。", + "name": "rbuffer_read_string", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "rbuffer_t*", + "name": "rbuffer", + "desc": "rbuffer对象。" + }, + { + "type": "uint8_t*", + "name": "value", + "desc": "返回读取的数据。" + } + ], + "annotation": {}, + "desc": "读取uint8数据,但不改变cursor的位置。", + "name": "rbuffer_peek_uint8", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "rbuffer_t*", + "name": "rbuffer", + "desc": "rbuffer对象。" + }, + { + "type": "uint16_t*", + "name": "value", + "desc": "返回读取的数据。" + } + ], + "annotation": {}, + "desc": "读取uint16数据,但不改变cursor的位置。", + "name": "rbuffer_peek_uint16", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "rbuffer_t*", + "name": "rbuffer", + "desc": "rbuffer对象。" + }, + { + "type": "uint32_t*", + "name": "value", + "desc": "读取的数据。" + } + ], + "annotation": {}, + "desc": "读取uint32数据,但不改变cursor的位置。", + "name": "rbuffer_peek_uint32", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + } + ], + "events": [], + "properties": [ + { + "name": "data", + "desc": "数据缓冲区。", + "type": "uint8_t*", + "annotation": { + "readable": true + } + }, + { + "name": "cursor", + "desc": "当前读取位置。", + "type": "uint32_t", + "annotation": { + "readable": true + } + }, + { + "name": "capacity", + "desc": "缓存区的容量。", + "type": "uint32_t", + "annotation": { + "readable": true + } + } + ], + "header": "tkc/buffer.h", + "desc": "Read Buffer。用于数据解包。\n\n示例:\n\n```c\nuint8_t buff[128];\nwbuffer_t wbuffer;\nrbuffer_t rbuffer;\nconst char* str = NULL;\nwbuffer_init(&wbuffer, buff, sizeof(buff));\n\nwbuffer_write_string(&wbuffer, \"hello awtk\");\n\nrbuffer_init(&rbuffer, wbuffer.data, wbuffer.cursor);\nrbuffer_read_string(&rbuffer, &str);\n```", + "name": "rbuffer_t", + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "type": "wbuffer_t*", + "name": "wbuffer", + "desc": "wbuffer对象。" + }, + { + "type": "uint8_t*", + "name": "data", + "desc": "缓冲区。" + }, + { + "type": "uint16_t", + "name": "capacity", + "desc": "缓冲区的容量。" + } + ], + "annotation": { + "constructor": true + }, + "desc": "初始wbuffer对象。", + "name": "wbuffer_init", + "return": { + "type": "wbuffer_t*", + "desc": "wbuffer对象本身。" + } + }, + { + "params": [ + { + "type": "wbuffer_t*", + "name": "wbuffer", + "desc": "wbuffer对象。" + } + ], + "annotation": { + "constructor": true + }, + "desc": "初始wbuffer对象,容量不够时是否支持自动扩展,使用完成后需要调用wbuffer\\_deinit释放资源。", + "name": "wbuffer_init_extendable", + "return": { + "type": "wbuffer_t*", + "desc": "wbuffer对象本身。" + } + }, + { + "params": [ + { + "type": "wbuffer_t*", + "name": "wbuffer", + "desc": "wbuffer对象。" + }, + { + "type": "uint32_t", + "name": "capacity", + "desc": "缓冲区的容量。" + } + ], + "annotation": {}, + "desc": "扩展缓冲区至指定的大小。", + "name": "wbuffer_extend_capacity", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "wbuffer_t*", + "name": "wbuffer", + "desc": "wbuffer对象。" + } + ], + "annotation": {}, + "desc": "释放资源。", + "name": "wbuffer_deinit", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "wbuffer_t*", + "name": "wbuffer", + "desc": "wbuffer对象。" + }, + { + "type": "int32_t", + "name": "delta", + "desc": "跳过的偏移量,正数往前负数往回跳。" + } + ], + "annotation": {}, + "desc": "跳过指定的长度。", + "name": "wbuffer_skip", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "wbuffer_t*", + "name": "wbuffer", + "desc": "wbuffer对象。" + }, + { + "type": "uint8_t", + "name": "value", + "desc": "要写入的数据。" + } + ], + "annotation": {}, + "desc": "写入uint8数据。", + "name": "wbuffer_write_uint8", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "wbuffer_t*", + "name": "wbuffer", + "desc": "wbuffer对象。" + }, + { + "type": "uint16_t", + "name": "value", + "desc": "要写入的数据。" + } + ], + "annotation": {}, + "desc": "写入uint16数据。", + "name": "wbuffer_write_uint16", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "wbuffer_t*", + "name": "wbuffer", + "desc": "wbuffer对象。" + }, + { + "type": "uint32_t", + "name": "value", + "desc": "要写入的数据。" + } + ], + "annotation": {}, + "desc": "写入uint32数据。", + "name": "wbuffer_write_uint32", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "wbuffer_t*", + "name": "wbuffer", + "desc": "wbuffer对象。" + }, + { + "type": "float_t", + "name": "value", + "desc": "要写入的数据。" + } + ], + "annotation": {}, + "desc": "写入float数据。", + "name": "wbuffer_write_float", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "wbuffer_t*", + "name": "wbuffer", + "desc": "wbuffer对象。" + }, + { + "type": "void*", + "name": "data", + "desc": "要写入的数据。" + }, + { + "type": "uint32_t", + "name": "size", + "desc": "要写入的数据长度。" + } + ], + "annotation": {}, + "desc": "写入指定长度的二进制数据。", + "name": "wbuffer_write_binary", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "wbuffer_t*", + "name": "wbuffer", + "desc": "wbuffer对象。" + }, + { + "type": "char*", + "name": "data", + "desc": "要写入的字符串。" + } + ], + "annotation": {}, + "desc": "写入字符串。", + "name": "wbuffer_write_string", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "wbuffer_t*", + "name": "wbuffer", + "desc": "wbuffer对象。" + }, + { + "type": "uint32_t", + "name": "size", + "desc": "空间大小。" + } + ], + "annotation": {}, + "desc": "是否还有空间。", + "name": "wbuffer_has_room", + "return": { + "type": "bool_t", + "desc": "返回FALSE表示无,否则表示有。" + } + } + ], + "events": [], + "properties": [ + { + "name": "data", + "desc": "数据缓冲区。用于保存写入的数据。", + "type": "uint8_t*", + "annotation": { + "readable": true + } + }, + { + "name": "cursor", + "desc": "当前写入位置。", + "type": "uint32_t", + "annotation": { + "readable": true + } + }, + { + "name": "capacity", + "desc": "数据缓冲区最大容量。", + "type": "uint32_t", + "annotation": { + "readable": true + } + }, + { + "name": "extendable", + "desc": "容量不够时是否支持自动扩展。", + "type": "bool_t", + "annotation": { + "readable": true + } + } + ], + "header": "tkc/buffer.h", + "desc": "Write Buffer。用于数据打包。\n\n示例:\n\n```c\nuint8_t buff[128];\nwbuffer_t wbuffer;\nrbuffer_t rbuffer;\nconst char* str = NULL;\nwbuffer_init(&wbuffer, buff, sizeof(buff));\n\nwbuffer_write_string(&wbuffer, \"hello awtk\");\n\nrbuffer_init(&rbuffer, wbuffer.data, wbuffer.cursor);\nrbuffer_read_string(&rbuffer, &str);\n```\n\n```c\nwbuffer_t wbuffer;\nwbuffer_init_extendable(&wbuffer);\n\nwbuffer_write_string(&wbuffer, \"hello awtk\");\n\nwbuffer_deinit(&wbuffer);\n```\n> 如果初始化为extendable,则最后需要调用wbuffer\\_deinit释放资源。", + "name": "wbuffer_t", + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "type": "async_exec_t", + "name": "exec", + "desc": "需要异步支持的函数。" + }, + { + "type": "async_on_result_t", + "name": "on_result", + "desc": "返回执行结果(可选)" + }, + { + "type": "void*", + "name": "ctx", + "desc": "两个回调函数的上下文。" + } + ], + "annotation": { + "static": true + }, + "desc": "异步执行exec函数,执行完成后,在后台线程调用on_result函数。", + "name": "async_call", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [], + "annotation": { + "static": true + }, + "desc": "全局初始化。", + "name": "async_call_init", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [], + "annotation": { + "static": true + }, + "desc": "全局~初始化。", + "name": "async_call_deinit", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + } + ], + "events": [], + "properties": [], + "header": "tkc/async.h", + "desc": "异步请求。", + "name": "async_t", + "annotation": { + "fake": true + }, + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "type": "uint16_t", + "name": "type", + "desc": "资源的类型。" + }, + { + "type": "uint16_t", + "name": "subtype", + "desc": "资源的子类型。" + }, + { + "type": "const char*", + "name": "name", + "desc": "资源的名称。" + }, + { + "type": "uint32_t", + "name": "size", + "desc": "资源的数据长度(用于分配空间)。" + } + ], + "annotation": { + "constructor": true + }, + "desc": "创建asset_info对象。\n\n> 主要供脚本语言使用。", + "name": "asset_info_create", + "return": { + "type": "asset_info_t*", + "desc": "asset_info对象。" + } + }, + { + "params": [ + { + "type": "asset_info_t*", + "name": "info", + "desc": "asset_info对象。" + } + ], + "annotation": { + "deconstructor": true + }, + "desc": "销毁asset_info对象。", + "name": "asset_info_destroy", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "asset_info_t*", + "name": "info", + "desc": "asset_info对象。" + } + ], + "annotation": {}, + "desc": "减少asset_info对象的引用计数。", + "name": "asset_info_unref", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "asset_info_t*", + "name": "info", + "desc": "asset_info对象。" + } + ], + "annotation": {}, + "desc": "增加asset_info对象的引用计数。", + "name": "asset_info_ref", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "const char*", + "name": "name", + "desc": "未格式化名字。" + } + ], + "annotation": {}, + "desc": "把资源名字格式化为符合标准长度的字符串。", + "name": "asset_info_get_formatted_name", + "return": { + "type": "ret_t", + "desc": "返回格式化后的名字。" + } + } + ], + "events": [], + "properties": [ + { + "name": "type", + "desc": "类型。", + "type": "uint16_t", + "annotation": { + "readable": true, + "scriptable": true + } + }, + { + "name": "subtype", + "desc": "子类型。", + "type": "uint8_t", + "annotation": { + "readable": true, + "scriptable": true + } + }, + { + "name": "is_in_rom", + "desc": "资源是否在ROM中。", + "type": "uint8_t", + "annotation": { + "readable": true, + "scriptable": true + } + }, + { + "name": "size", + "desc": "大小。", + "type": "uint32_t", + "annotation": { + "readable": true, + "scriptable": true + } + }, + { + "name": "refcount", + "desc": "引用计数。\nis\\_in\\_rom == FALSE时才有效。", + "type": "uint32_t", + "annotation": { + "readable": true, + "scriptable": true + } + }, + { + "name": "name", + "desc": "名称。", + "type": "char*", + "annotation": { + "readable": true, + "scriptable": true + } + } + ], + "header": "tkc/asset_info.h", + "desc": "单个资源的描述信息。", + "name": "asset_info_t", + "annotation": { + "scriptable": true + }, + "level": 1 + }, + { + "type": "class", + "methods": [], + "events": [], + "properties": [], + "header": "tkc/asset_info.h", + "desc": "预加载资源的描述信息。", + "name": "preload_res_t", + "level": 1 + }, + { + "type": "enum", + "desc": "UI资源类型定义。", + "consts": [ + { + "desc": "无效UI类型。", + "name": "ASSET_TYPE_UI_NONE" + }, + { + "desc": "二进制的UI类型。", + "name": "ASSET_TYPE_UI_BIN" + }, + { + "desc": "XML格式的UI类型。", + "name": "ASSET_TYPE_UI_XML" + } + ], + "header": "tkc/asset_info.h", + "name": "asset_ui_type_t", + "prefix": "ASSET_UI_TYPE_", + "level": 1 + }, + { + "type": "enum", + "desc": "图片资源类型定义。", + "consts": [ + { + "desc": "未知图片类型。", + "name": "ASSET_TYPE_IMAGE_NONE" + }, + { + "desc": "Raw图片类型。", + "name": "ASSET_TYPE_IMAGE_RAW" + }, + { + "desc": "位图图片类型。", + "name": "ASSET_TYPE_IMAGE_BMP" + }, + { + "desc": "PNG图片类型。", + "name": "ASSET_TYPE_IMAGE_PNG" + }, + { + "desc": "JPG图片类型。", + "name": "ASSET_TYPE_IMAGE_JPG" + }, + { + "desc": "BSVG图片类型。", + "name": "ASSET_TYPE_IMAGE_BSVG" + }, + { + "desc": "GIF图片类型。", + "name": "ASSET_TYPE_IMAGE_GIF" + }, + { + "desc": "WEBP图片类型。", + "name": "ASSET_TYPE_IMAGE_WEBP" + }, + { + "desc": "LZ4压缩的图片类型。", + "name": "ASSET_TYPE_IMAGE_LZ4" + }, + { + "desc": "其它图片类型。", + "name": "ASSET_TYPE_IMAGE_OTHER" + } + ], + "header": "tkc/asset_info.h", + "name": "asset_image_type_t", + "prefix": "ASSET_IMAGE_TYPE_", + "level": 1 + }, + { + "type": "enum", + "desc": "脚本资源类型定义。", + "consts": [ + { + "desc": "未知脚本类型。", + "name": "ASSET_TYPE_SCRIPT_NONE" + }, + { + "desc": "JS脚本类型。", + "name": "ASSET_TYPE_SCRIPT_JS" + }, + { + "desc": "LUA脚本类型。", + "name": "ASSET_TYPE_SCRIPT_LUA" + }, + { + "desc": "Python脚本类型。", + "name": "ASSET_TYPE_SCRIPT_PYTHON" + } + ], + "header": "tkc/asset_info.h", + "name": "asset_script_type_t", + "prefix": "ASSET_SCRIPT_TYPE_", + "level": 1 + }, + { + "type": "enum", + "desc": "数据资源类型定义。", + "consts": [ + { + "desc": "未知数据类型。", + "name": "ASSET_TYPE_DATA_NONE" + }, + { + "desc": "文本数据类型。", + "name": "ASSET_TYPE_DATA_TEXT" + }, + { + "desc": "二进制数据类型。", + "name": "ASSET_TYPE_DATA_BIN" + }, + { + "desc": "JSON数据类型。", + "name": "ASSET_TYPE_DATA_JSON" + }, + { + "desc": "通用数据类型。", + "name": "ASSET_TYPE_DATA_DAT" + } + ], + "header": "tkc/asset_info.h", + "name": "asset_data_type_t", + "prefix": "ASSET_DATA_TYPE_", + "level": 1 + }, + { + "type": "enum", + "desc": "字体资源类型定义。", + "consts": [ + { + "desc": "无效字体。", + "name": "ASSET_TYPE_FONT_NONE" + }, + { + "desc": "TTF字体。", + "name": "ASSET_TYPE_FONT_TTF" + }, + { + "desc": "位图字体。", + "name": "ASSET_TYPE_FONT_BMP" + } + ], + "header": "tkc/asset_info.h", + "name": "asset_font_type_t", + "prefix": "ASSET_FONT_TYPE_", + "level": 1 + }, + { + "type": "enum", + "desc": "资源类型常量定义。", + "consts": [ + { + "desc": "无效资源。", + "name": "ASSET_TYPE_NONE" + }, + { + "desc": "字体资源。", + "name": "ASSET_TYPE_FONT" + }, + { + "desc": "图片资源。", + "name": "ASSET_TYPE_IMAGE" + }, + { + "desc": "主题资源。", + "name": "ASSET_TYPE_STYLE" + }, + { + "desc": "UI数据资源。", + "name": "ASSET_TYPE_UI" + }, + { + "desc": "XML数据资源。", + "name": "ASSET_TYPE_XML" + }, + { + "desc": "字符串数据资源。", + "name": "ASSET_TYPE_STRINGS" + }, + { + "desc": "JS等脚本资源。", + "name": "ASSET_TYPE_SCRIPT" + }, + { + "desc": "流图资源。", + "name": "ASSET_TYPE_FLOW" + }, + { + "desc": "其它数据资源。", + "name": "ASSET_TYPE_DATA" + } + ], + "header": "tkc/asset_info.h", + "name": "asset_type_t", + "prefix": "ASSET_TYPE_", + "annotation": { + "scriptable": true + }, + "level": 1 + }, + { + "type": "enum", + "desc": "缓存不够时丢弃数据的策略。", + "consts": [ + { + "desc": "丢弃旧的数据。", + "name": "DATA_DISCARD_OLD" + }, + { + "desc": "丢弃新的数据。", + "name": "DATA_DISCARD_NEW" + } + ], + "header": "misc/ostream_retry.h", + "name": "data_discard_policy_t", + "prefix": "DATA_DISCARD_", + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [], + "annotation": { + "constructor": true + }, + "desc": "创建action_thread对象。", + "name": "action_thread_create", + "return": { + "type": "action_thread_t*", + "desc": "action_thread对象。" + } + }, + { + "params": [ + { + "type": "waitable_action_queue_t*", + "name": "queue", + "desc": "queue对象。" + } + ], + "annotation": { + "constructor": true + }, + "desc": "创建action_thread对象。", + "name": "action_thread_create_with_queue", + "return": { + "type": "action_thread_t*", + "desc": "action_thread对象。" + } + }, + { + "params": [ + { + "type": "action_thread_t*", + "name": "thread", + "desc": "action_thread对象。" + }, + { + "type": "qaction_t*", + "name": "action", + "desc": "action对象。" + } + ], + "annotation": {}, + "desc": "让线程执行action。", + "name": "action_thread_exec", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "action_thread_t*", + "name": "thread", + "desc": "action_thread对象。" + }, + { + "type": "action_thread_on_idle_t", + "name": "on_idle", + "desc": "空闲时的回调函数。" + }, + { + "type": "void*", + "name": "ctx", + "desc": "回调函数的上下文。" + } + ], + "annotation": {}, + "desc": "设置空闲时的回调函数。", + "name": "action_thread_set_on_idle", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "action_thread_t*", + "name": "thread", + "desc": "action_thread对象。" + }, + { + "type": "action_thread_on_quit_t", + "name": "on_quit", + "desc": "退出时的回调函数。" + }, + { + "type": "void*", + "name": "ctx", + "desc": "回调函数的上下文。" + } + ], + "annotation": {}, + "desc": "设置退出时的回调函数。", + "name": "action_thread_set_on_quit", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "action_thread_t*", + "name": "thread", + "desc": "action_thread对象。" + } + ], + "annotation": {}, + "desc": "销毁。", + "name": "action_thread_destroy", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + } + ], + "events": [], + "properties": [ + { + "name": "thread", + "desc": "线程对象。", + "type": "tk_thread_t*", + "annotation": { + "readable": true + } + }, + { + "name": "queue", + "desc": "action queue。", + "type": "waitable_action_queue_t*", + "annotation": { + "readable": true + } + }, + { + "name": "executed_actions_nr", + "desc": "已经执行action的个数。", + "type": "uint32_t", + "annotation": { + "readable": true + } + } + ], + "header": "tkc/action_thread.h", + "desc": "执行action的线程。\n\n> 每个线程都有一个action queue,可以是共享的queue,也可以是私有的queue。", + "name": "action_thread_t", + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "type": "uint16_t", + "name": "max_thread_nr", + "desc": "最大线程数。" + }, + { + "type": "uint16_t", + "name": "min_idle_nr", + "desc": "最小空闲线程数。" + } + ], + "annotation": { + "constructor": true + }, + "desc": "创建action_thread_pool对象。", + "name": "action_thread_pool_create", + "return": { + "type": "action_thread_pool_t*", + "desc": "action_thread_pool对象。" + } + }, + { + "params": [ + { + "type": "action_thread_pool_t*", + "name": "thread_pool", + "desc": "action_thread_pool对象。" + }, + { + "type": "qaction_t*", + "name": "action", + "desc": "action对象。" + } + ], + "annotation": {}, + "desc": "执行action。", + "name": "action_thread_pool_exec", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "action_thread_pool_t*", + "name": "thread_pool", + "desc": "action_thread_pool对象。" + } + ], + "annotation": {}, + "desc": "销毁。", + "name": "action_thread_pool_destroy", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + } + ], + "events": [], + "properties": [ + { + "name": "max_thread_nr", + "desc": "最大线程数。", + "type": "uint32_t", + "annotation": { + "readable": true + } + }, + { + "name": "min_idle_nr", + "desc": "最小空闲线程数", + "type": "uint32_t", + "annotation": { + "readable": true + } + } + ], + "header": "tkc/action_thread_pool.h", + "desc": "action线程池。", + "name": "action_thread_pool_t", + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "type": "bsvg_t*", + "name": "", + "desc": "。" + }, + { + "type": "const uint32_t*", + "name": "data", + "desc": "svg数据。" + }, + { + "type": "size", + "name": "size", + "desc": "data长度。" + } + ], + "annotation": {}, + "desc": "初始化bsvg对象。", + "name": "bsvg_init", + "return": { + "type": "bsvg_t*", + "desc": "返回解析后的svg。" + } + } + ], + "events": [], + "properties": [], + "header": "svg/bsvg.h", + "desc": "SVG的二进制格式。", + "name": "bsvg_t", + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "type": "uint32_t*", + "name": "data", + "desc": "bsvg数据。" + }, + { + "type": "uint32_t", + "name": "size", + "desc": "bsvg数据长度。" + }, + { + "type": "str_t*", + "name": "str", + "desc": "用于返回svg数据。" + } + ], + "annotation": {}, + "desc": "bsvg to svg", + "name": "bsvg_to_svg", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "const char*", + "name": "xml", + "desc": "svg数据。" + }, + { + "type": "uint32_t", + "name": "size", + "desc": "svg数据长度。" + }, + { + "type": "uint32_t*", + "name": "out", + "desc": "用于返回bsvg数据。" + }, + { + "type": "uint32_t*", + "name": "out_size", + "desc": "bsvg数据长度。" + } + ], + "annotation": {}, + "desc": "svg to bsvg", + "name": "svg_to_bsvg", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "uint32_t", + "name": "capacity", + "desc": "action的容量。" + } + ], + "annotation": { + "constructor": true + }, + "desc": "创建action_queue对象。", + "name": "action_queue_create", + "return": { + "type": "action_queue_t*", + "desc": "action_queue对象。" + } + }, + { + "params": [ + { + "type": "action_queue_t*", + "name": "q", + "desc": "action_queue对象。" + }, + { + "type": "qaction_t**", + "name": "action", + "desc": "用于返回action对象。" + } + ], + "annotation": {}, + "desc": "接收一个请求。", + "name": "action_queue_recv", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "action_queue_t*", + "name": "q", + "desc": "action_queue对象。" + }, + { + "type": "qaction_t*", + "name": "action", + "desc": "action对象。" + } + ], + "annotation": {}, + "desc": "发送一个请求。", + "name": "action_queue_send", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "action_queue_t*", + "name": "q", + "desc": "action_queue对象。" + } + ], + "annotation": {}, + "desc": "销毁。", + "name": "action_queue_destroy", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + } + ], + "events": [], + "properties": [], + "header": "svg/bsvg_to_svg.h", + "desc": "", + "name": "svg_helper_t", + "annotation": { + "fake": true + }, + "level": 1 + }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "type": "int", + "name": "fd", + "desc": "fd." + } + ], + "annotation": {}, + "desc": "创建ostream对象。", + "name": "tk_ostream_serial_create", + "return": { + "type": "tk_ostream_t*", + "desc": "返回ostream对象。" + } + } + ], + "events": [], + "properties": [], + "header": "serial/ostream_serial.h", + "desc": "基于串口实现的输出流。\n\ninput stream base on fd", + "name": "tk_ostream_serial_t", + "level": 1 }, { "type": "class", @@ -47471,6 +41439,91 @@ }, "level": 2 }, + { + "type": "class", + "methods": [ + { + "params": [], + "annotation": { + "constructor": true + }, + "desc": "创建控件自身布局对象。", + "name": "self_layouter_menu_create", + "return": { + "type": "self_layouter_t*", + "desc": "返回创建控件自身布局对象。" + } + } + ], + "events": [], + "properties": [], + "header": "layouters/self_layouter_menu.h", + "desc": "menu的控件自身布局算法实现(一般用于popup或dialog窗口)。\n\n> 用法请参考:[缺省控件自身布局算法](\nhttps://github.com/zlgopen/awtk/blob/master/docs/self_layouter_menu.md)", + "name": "self_layouter_menu_t", + "parent": "self_layouter_t", + "level": 2 + }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "type": "const char*", + "name": "assetname", + "desc": "资源的名称。" + } + ], + "annotation": { + "constructor": true + }, + "desc": "创建基于asset的data reader。\n\n> 不要直接调用,而是注册到 data\\_reader\\_factory后,通过data\\_reader\\_factory调用。", + "name": "data_reader_asset_create", + "return": { + "type": "data_reader_t*", + "desc": "返回data reader对象。" + } + }, + { + "params": [ + { + "type": "const char*", + "name": "name", + "desc": "资源的名称。" + }, + { + "type": "asset_type_t", + "name": "type", + "desc": "资源的类型。" + }, + { + "type": "char*", + "name": "url", + "desc": "生成的URL。" + } + ], + "annotation": { + "static": true + }, + "desc": "构造内存URL。", + "name": "data_reader_asset_build_url", + "return": { + "type": "const char*", + "desc": "返回URL。" + } + } + ], + "events": [], + "properties": [], + "header": "base/data_reader_asset.h", + "desc": "基于资源实现的 data_reader。通过 data_reader_factory 创建 reader 时,URL的格式如下(请用函数data_reader_asset_build_url生成):\n\n```\nasset://type/name\n```", + "name": "data_reader_asset_t", + "parent": "data_reader_t", + "annotation": { + "fake": true + }, + "level": 2 + }, { "type": "class", "methods": [ @@ -47506,8 +41559,8 @@ "constructor": true, "scriptable": true }, - "desc": "创建lang_indicator对象", - "name": "lang_indicator_create", + "desc": "创建view对象", + "name": "view_create", "return": { "type": "widget_t*", "desc": "对象。" @@ -47522,7 +41575,7 @@ }, { "type": "const char*", - "name": "image", + "name": "default_focused_child", "desc": "缺省获得焦点的子控件(可用控件名或类型)。" } ], @@ -47530,7 +41583,7 @@ "scriptable": true }, "desc": "设置缺省获得焦点的子控件(可用控件名或类型)。", - "name": "lang_indicator_set_image", + "name": "view_set_default_focused_child", "return": { "type": "ret_t", "desc": "返回RET_OK表示成功,否则表示失败。" @@ -47541,26 +41594,26 @@ { "type": "widget_t*", "name": "widget", - "desc": "lang_indicator对象。" + "desc": "view对象。" } ], "annotation": { "cast": true, "scriptable": true }, - "desc": "转换为lang_indicator对象(供脚本语言使用)。", - "name": "lang_indicator_cast", + "desc": "转换为view对象(供脚本语言使用)。", + "name": "view_cast", "return": { "type": "widget_t*", - "desc": "lang_indicator对象。" + "desc": "view对象。" } } ], "events": [], "properties": [ { - "name": "image", - "desc": "如果希望用图片格式显示,本属性用于指定图片的前缀。", + "name": "default_focused_child", + "desc": "缺省获得焦点的子控件(可用控件名或类型)。\n\n> view作为pages/slideview的直接子控件才需要设置。\n> 正常情况下,一个窗口只能指定一个初始焦点。\n> 但是对于pages/slideview来说,可能希望每一个页面都有一个初始焦点,此时可用default\\_focused\\_child来指定。", "type": "char*", "annotation": { "set_prop": true, @@ -47572,9 +41625,9 @@ } } ], - "header": "keyboard/lang_indicator.h", - "desc": "输入法语言指示器。\n\n用于显示输入法的输入语言或类型,主要用于T9输入法。\n\nlang_indicator\\_t是[widget\\_t](widget_t.md)的子类控件,widget\\_t的函数均适用于lang_indicator\\_t控件。\n\n在xml中使用\"lang_indicator\"标签创建lang_indicator。如:\n\n```xml\n\n\n```\n\n可用通过style来设置控件的显示风格,如背景颜色等。如:\n\n```xml\n\n```", - "name": "lang_indicator_t", + "header": "widgets/view.h", + "desc": "一个通用的容器控件。\n\n它本身不提供布局功能,仅提供具有语义的标签,让xml更具有可读性。\n子控件的布局可用layout\\_children属性指定。\n请参考[布局参数](https://github.com/zlgopen/awtk/blob/master/docs/layout.md)。\n\nview\\_t是[widget\\_t](widget_t.md)的子类控件,widget\\_t的函数均适用于view\\_t控件。\n\n在xml中使用\"view\"标签创建view。如:\n\n```xml\n\n\n```\n\n可用通过style来设置控件的显示风格,如背景颜色等。如:\n\n```xml\n\n```", + "name": "view_t", "parent": "widget_t", "annotation": { "scriptable": true, @@ -47618,8 +41671,1346 @@ "constructor": true, "scriptable": true }, - "desc": "创建line_number对象", - "name": "line_number_create", + "desc": "创建tab_control对象", + "name": "tab_control_create", + "return": { + "type": "widget_t*", + "desc": "对象。" + } + }, + { + "params": [ + { + "type": "widget_t*", + "name": "widget", + "desc": "tab_control对象。" + } + ], + "annotation": { + "cast": true, + "scriptable": true + }, + "desc": "转换tab_control对象(供脚本语言使用)。", + "name": "tab_control_cast", + "return": { + "type": "widget_t*", + "desc": "tab_control对象。" + } + } + ], + "events": [], + "properties": [], + "header": "widgets/tab_control.h", + "desc": "标签控件。\n\n它本身不提供布局功能,仅提供具有语义的标签,让xml更具有可读性。\n\n标签控件通常会包含一个pages控件和一个tab\\_button\\_group控件。\n\n```graphviz\n[default_style]\n\npages_t -> tab_control_t[arrowhead = \"ediamond\"]\ntab_button_group_t -> tab_control_t[arrowhead = \"ediamond\"]\nview_t ->pages_t[arrowhead = \"ediamond\"]\ntab_button_t -> tab_button_group_t[arrowhead = \"ediamond\"]\n```\n\ntab\\_control\\_t是[widget\\_t](widget_t.md)的子类控件,\nwidget\\_t的函数均适用于tab\\_control\\_t控件。\n\n在xml中使用\"tab\\_control\"标签创建标签控件。如:\n\n```xml\n\n\n...\n\n\n...\n\n\n```\n\n> 更多用法请参考:\n[tab control](https://github.com/zlgopen/awtk/blob/master/design/default/ui/)", + "name": "tab_control_t", + "parent": "widget_t", + "annotation": { + "scriptable": true, + "design": true, + "widget": true + }, + "level": 2 + }, + { + "type": "class", + "methods": [ + { + "params": [ + { + "type": "widget_t*", + "name": "parent", + "desc": "父控件" + }, + { + "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": { + "constructor": true, + "scriptable": true + }, + "desc": "创建tab_button对象", + "name": "tab_button_create", + "return": { + "type": "widget_t*", + "desc": "对象。" + } + }, + { + "params": [ + { + "type": "widget_t*", + "name": "widget", + "desc": "tab_button对象。" + } + ], + "annotation": { + "cast": true, + "scriptable": true + }, + "desc": "转换tab_button对象(供脚本语言使用)。", + "name": "tab_button_cast", + "return": { + "type": "widget_t*", + "desc": "tab_button对象。" + } + }, + { + "params": [ + { + "type": "widget_t*", + "name": "widget", + "desc": "tab_button对象。" + }, + { + "type": "uint32_t", + "name": "value", + "desc": "是否为当前标签。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "设置为当前标签。", + "name": "tab_button_set_value", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "widget_t*", + "name": "widget", + "desc": "tab_button对象。" + }, + { + "type": "char*", + "name": "name", + "desc": "当前项的图标。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "设置控件的图标。", + "name": "tab_button_set_icon", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "widget_t*", + "name": "widget", + "desc": "tab_button对象。" + }, + { + "type": "char*", + "name": "name", + "desc": "当前项的图标。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "设置控件的active图标。", + "name": "tab_button_set_active_icon", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + }, + { + "params": [ + { + "type": "widget_t*", + "name": "widget", + "desc": "tab_button对象。" + }, + { + "type": "char*", + "name": "name", + "desc": "动态加载UI的资源名称。" + } + ], + "annotation": { + "scriptable": true + }, + "desc": "设置控件动态加载显示UI。", + "name": "tab_button_set_load_ui", + "return": { + "type": "ret_t", + "desc": "返回RET_OK表示成功,否则表示失败。" + } + } + ], + "events": [ + { + "name": "EVT_VALUE_WILL_CHANGE", + "desc": "值(激活状态)即将改变事件。", + "type": "event_t" + }, + { + "name": "EVT_VALUE_CHANGED", + "desc": "值(激活状态)改变事件。", + "type": "event_t" + } + ], + "properties": [ + { + "name": "value", + "desc": "值。", + "type": "bool_t", + "annotation": { + "set_prop": true, + "get_prop": true, + "readable": true, + "persitent": true, + "design": true, + "scriptable": true + } + }, + { + "name": "load_ui", + "desc": "激活后加载的UI名字。", + "type": "char*", + "annotation": { + "set_prop": true, + "get_prop": true, + "readable": true, + "persitent": true, + "design": true, + "scriptable": true + } + }, + { + "name": "active_icon", + "desc": "当前项的图标的名称。", + "type": "char*", + "annotation": { + "set_prop": true, + "get_prop": true, + "readable": true, + "persitent": true, + "design": true, + "scriptable": true + } + }, + { + "name": "icon", + "desc": "非当前项的图标的名称。", + "type": "char*", + "annotation": { + "set_prop": true, + "get_prop": true, + "readable": true, + "persitent": true, + "design": true, + "scriptable": true + } + } + ], + "header": "widgets/tab_button.h", + "desc": "标签按钮控件。\n\n标签按钮有点类似单选按钮,但点击标签按钮之后会自动切换当前的标签页。\n\ntab\\_button\\_t是[widget\\_t](widget_t.md)的子类控件,widget\\_t的函数均适用于tab\\_button\\_t控件。\n\n在xml中使用\"tab\\_button\"标签创建标签按钮控件。如:\n\n```xml\n\n\n