From c0b3af94efefdc4cad80f0adf04a436208737a81 Mon Sep 17 00:00:00 2001 From: lixianjing Date: Sun, 3 Jan 2021 18:49:51 +0800 Subject: [PATCH] rm temp files --- .gitignore | 4 + dllexports/README.md | 1 + dllexports/awtk.def | 2199 -- dllexports/tkc.def | 865 - tools/idl_gen/idl.json | 66096 --------------------------------------- tools/idl_gen/tkc.json | 23648 -------------- 6 files changed, 5 insertions(+), 92808 deletions(-) create mode 100644 dllexports/README.md delete mode 100644 dllexports/awtk.def delete mode 100644 dllexports/tkc.def delete mode 100644 tools/idl_gen/idl.json delete mode 100644 tools/idl_gen/tkc.json diff --git a/.gitignore b/.gitignore index 9d10269cc..70b15bea7 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,7 @@ release event_log.bin res/assets/default/inc/fonts/default_full.res *.log +dllexports/awtk.def +dllexports/tkc.def +tools/idl_gen/idl.json +tools/idl_gen/tkc.json diff --git a/dllexports/README.md b/dllexports/README.md new file mode 100644 index 000000000..18055dc23 --- /dev/null +++ b/dllexports/README.md @@ -0,0 +1 @@ +# 导出函数 diff --git a/dllexports/awtk.def b/dllexports/awtk.def deleted file mode 100644 index 728ada2ff..000000000 --- a/dllexports/awtk.def +++ /dev/null @@ -1,2199 +0,0 @@ -LIBRARY awtk -EXPORTS - event_cast - event_create - event_destroy - event_init - emitter_create - emitter_init - emitter_dispatch - emitter_dispatch_simple_event - emitter_on - emitter_exist - emitter_on_with_tag - emitter_off - emitter_off_by_func - emitter_off_by_ctx - emitter_off_by_tag - emitter_set_on_destroy - emitter_find - emitter_enable - emitter_disable - emitter_size - emitter_deinit - 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 - bitmap_lock_buffer_for_read - bitmap_lock_buffer_for_write - bitmap_unlock_buffer - bitmap_get_pixel - bitmap_set_line_length - bitmap_get_line_length - bitmap_init_from_rgba - bitmap_init - bitmap_save_png - bitmap_mono_dump - 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 - value_int8 - value_set_uint8 - value_uint8 - value_set_int16 - value_int16 - value_set_uint16 - value_uint16 - value_set_int32 - value_int32 - value_set_uint32 - value_uint32 - value_set_int64 - value_int64 - value_set_uint64 - value_uint64 - value_set_pointer - value_pointer - value_set_float - value_float - value_set_float32 - value_float32 - value_set_double - value_double - value_set_str - value_dup_str - value_dup_str_with_len - value_set_wstr - value_str - value_str_ex - value_wstr - value_is_null - value_equal - value_int - value_set_int - value_set_object - value_object - value_set_token - value_token - value_set_sized_str - value_sized_str - value_set_binary_data - value_dup_binary_data - value_binary_data - value_set_ubjson - value_ubjson - value_copy - value_deep_copy - value_create - value_destroy - value_reset - value_cast - value_type_size - tk_init - tk_run - tk_quit - tk_get_pointer_x - tk_get_pointer_y - tk_is_pointer_pressed - tk_set_lcd_orientation - tk_init_assets - tk_init_internal - tk_deinit_internal - tk_exit - tk_is_ui_thread - tk_run_in_ui_thread - 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 - children_layouter_factory_register - children_layouter_factory_create_layouter - children_layouter_factory_destroy - children_layouter_to_string - children_layouter_layout - children_layouter_get_param - children_layouter_set_param - children_layouter_set_param_str - children_layouter_get_param_float - children_layouter_get_param_int - children_layouter_is_valid - children_layouter_destroy - children_layouter_create - children_layouter_clone - clip_board - clip_board_set - clip_board_clear - clip_board_set_data - clip_board_get_data - clip_board_destroy - clip_board_set_text - clip_board_get_text - dialog_highlighter_factory - dialog_highlighter_factory_set - dialog_highlighter_factory_create - dialog_highlighter_factory_register - dialog_highlighter_factory_create_highlighter - dialog_highlighter_factory_destroy - dialog_highlighter_create - dialog_highlighter_set_bg - dialog_highlighter_set_bg_clip_rect - dialog_highlighter_prepare - dialog_highlighter_prepare_ex - dialog_highlighter_set_system_bar_alpha - dialog_highlighter_get_alpha - dialog_highlighter_draw - dialog_highlighter_draw_mask - dialog_highlighter_is_dynamic - dialog_highlighter_destroy - asset_type_find_by_value - find_item - find_item_by_value - keys_type_find - keys_type_find_by_value - event_recorder_player_start_record - event_recorder_player_start_play - event_recorder_player_stop_record - event_recorder_player_stop_play - font_loader_load - font_manager - font_manager_set - font_manager_create - font_manager_init - font_manager_set_assets_manager - font_manager_add_font - font_manager_get_font - font_manager_unload_font - font_manager_shrink_cache - font_manager_unload_all - font_manager_deinit - font_manager_destroy - glyph_create - glyph_clone - glyph_destroy - font_get_vmetrics - font_match - font_get_glyph - font_shrink_cache - font_destroy - glyph_cache_init - glyph_cache_add - glyph_cache_lookup - glyph_cache_shrink - glyph_cache_deinit - graphic_buffer_create_for_bitmap - graphic_buffer_create_with_data - graphic_buffer_lock_for_read - graphic_buffer_lock_for_write - graphic_buffer_unlock - graphic_buffer_attach - graphic_buffer_is_valid_for - graphic_buffer_destroy - idle_add - idle_queue - idle_remove - idle_set_on_destroy - idle_dispatch - idle_count - image_loader_load - image_loader_register - image_loader_unregister - image_loader_load_image - image_manager - image_manager_set - image_manager_create - image_manager_init - image_manager_get_bitmap - image_manager_preload - image_manager_unload_unused - image_manager_unload_all - image_manager_unload_bitmap - image_manager_update_specific - image_manager_set_assets_manager - image_manager_deinit - image_manager_destroy - input_device_status_init - input_device_status_on_input_event - input_device_status_abort_all_pressed_keys - input_engine_create - input_engine_destroy - input_engine_reset_input - input_engine_input - input_engine_search - input_method_dispatch - input_method_dispatch_to_widget - input_method_on - input_method_off - input_method_request - input_method_update_action_button_info - input_method_dispatch_action - input_method_commit_text - input_method_set_lang - input_method_get_lang - input_method_commit_text_ex - input_method_dispatch_key - input_method_dispatch_keys - input_method_dispatch_preedit - input_method_dispatch_preedit_confirm - input_method_dispatch_preedit_abort - input_method_dispatch_candidates - input_method_dispatch_pre_candidates - input_method_create - input_method_destroy - input_method - input_method_set - widget_layout_self - widget_layout_children_default - widget_layout_floating_children - widget_get_children_for_layout - lcd_begin_frame - lcd_set_clip_rect - lcd_get_clip_rect - lcd_resize - lcd_set_global_alpha - lcd_set_text_color - lcd_set_stroke_color - lcd_set_fill_color - lcd_set_font_name - lcd_set_font_size - lcd_draw_vline - lcd_draw_hline - lcd_draw_points - lcd_get_point_color - lcd_fill_rect - lcd_clear_rect - lcd_stroke_rect - lcd_draw_glyph - lcd_measure_text - lcd_draw_text - lcd_draw_image - lcd_draw_image_matrix - lcd_get_vgcanvas - lcd_take_snapshot - lcd_get_desired_bitmap_format - lcd_get_width - lcd_get_height - lcd_is_swappable - lcd_end_frame - lcd_get_text_metrics - lcd_destroy - line_break_check - word_break_check - line_break_count - line_break - locale_info - locale_info_set - locale_info_create - locale_info_tr - locale_info_change - locale_info_on - locale_info_off - locale_info_set_assets_manager - locale_info_reload - locale_info_destroy - main_loop - main_loop_add_event_source - main_loop_remove_event_source - main_loop_remove_event_source_by_tag - self_layouter_factory - self_layouter_factory_set - self_layouter_factory_create - self_layouter_factory_register - self_layouter_factory_create_layouter - self_layouter_factory_destroy - self_layouter_to_string - self_layouter_layout - self_layouter_get_param - self_layouter_set_param - self_layouter_set_param_str - self_layouter_get_param_float - self_layouter_get_param_int - self_layouter_destroy - self_layouter_create - self_layouter_clone - shortcut_init - shortcut_init_with_str - shortcut_equal - shortcut_match - style_factory_create_style - style_factory - style_factory_set - style_notify_widget_state_changed - style_is_valid - style_get_int - style_get_color - style_get_str - style_set - style_is_mutable - style_destroy - style_normalize_value - suggest_words_create - suggest_words_find - suggest_words_destroy - text_edit_create - text_edit_set_canvas - text_edit_click - text_edit_drag - text_edit_paste - text_edit_cut - text_edit_copy - text_edit_key_down - text_edit_key_up - text_edit_set_select - text_edit_select_all - text_edit_unselect - text_edit_set_cursor - text_edit_get_cursor - text_edit_get_state - text_edit_set_wrap_word - text_edit_invert_caret_visible - text_edit_set_caret_visible - text_edit_set_max_rows - text_edit_set_mask - text_edit_set_tips - text_edit_set_mask_char - text_edit_paint - text_edit_layout - text_edit_set_offset - text_edit_set_on_state_changed - text_edit_destroy - text_edit_preedit_clear - text_edit_preedit - text_edit_preedit_confirm - text_edit_preedit_abort - theme - theme_set - theme_create - theme_init - theme_find_style - theme_deinit - theme_destroy - timer_add - timer_queue - timer_remove - timer_reset - timer_suspend - timer_resume - timer_modify - timer_set_on_destroy - timer_count - timer_next_time - ui_builder_on_widget_start - ui_builder_on_widget_prop - ui_builder_on_widget_prop_end - ui_builder_on_widget_end - ui_builder_on_start - ui_builder_on_end - ui_feedback_request - ui_feedback_init - ui_loader_load - ui_loader_load_widget - velocity_reset - velocity_update - vgcanvas_create - vgcanvas_cast - vgcanvas_reinit - vgcanvas_reset - vgcanvas_reset_curr_state - vgcanvas_flush - vgcanvas_begin_frame - vgcanvas_clear_rect - vgcanvas_begin_path - vgcanvas_move_to - vgcanvas_line_to - vgcanvas_quad_to - vgcanvas_bezier_to - vgcanvas_arc_to - vgcanvas_arc - vgcanvas_is_point_in_path - vgcanvas_rect - vgcanvas_rounded_rect - vgcanvas_ellipse - vgcanvas_close_path - vgcanvas_path_winding - vgcanvas_rotate - vgcanvas_scale - vgcanvas_translate - vgcanvas_transform - vgcanvas_set_transform - vgcanvas_clip_rect - vgcanvas_intersect_clip_rect - vgcanvas_fill - vgcanvas_stroke - vgcanvas_paint - vgcanvas_set_font - vgcanvas_set_font_size - vgcanvas_set_text_align - vgcanvas_set_text_baseline - vgcanvas_get_text_metrics - vgcanvas_fill_text - vgcanvas_measure_text - vgcanvas_draw_image - vgcanvas_draw_icon - vgcanvas_set_antialias - vgcanvas_set_global_alpha - vgcanvas_set_line_width - vgcanvas_set_fill_color - vgcanvas_set_fill_color_str - vgcanvas_set_fill_linear_gradient - vgcanvas_set_fill_radial_gradient - vgcanvas_set_stroke_color - vgcanvas_set_stroke_color_str - vgcanvas_set_stroke_linear_gradient - vgcanvas_set_stroke_radial_gradient - vgcanvas_set_line_cap - vgcanvas_set_line_join - vgcanvas_set_miter_limit - vgcanvas_save - vgcanvas_restore - vgcanvas_end_frame - vgcanvas_get_width - vgcanvas_get_height - vgcanvas_clear_cache - vgcanvas_destroy - widget_animator_create - widget_animator_manager - widget_animator_manager_set - widget_animator_manager_create - widget_animator_manager_init - widget_animator_manager_deinit - widget_animator_manager_destroy - widget_animator_manager_add - widget_animator_manager_remove - widget_animator_manager_count - widget_animator_manager_start - widget_animator_manager_stop - widget_animator_manager_pause - widget_animator_manager_find - widget_animator_manager_remove_all - widget_animator_manager_set_time_scale - widget_animator_manager_time_elapse - widget_animator_init - widget_animator_set_name - widget_animator_set_yoyo - widget_animator_set_repeat - widget_animator_set_reversed - widget_animator_set_time_scale - widget_animator_on - widget_animator_off - widget_animator_start - widget_animator_stop - widget_animator_pause - widget_animator_set_destroy_when_done - widget_animator_destroy - widget_invalidate_default - widget_on_event_default - widget_on_paint_self_default - widget_on_paint_children_default - widget_on_keydown_default - widget_on_keyup_default - widget_on_pointer_down_default - widget_on_pointer_move_default - widget_on_pointer_up_default - widget_on_copy_default - widget_get_prop_default - widget_set_prop_default - widget_find_target_default - widget_on_paint_null - widget_count_children - widget_get_child - widget_get_native_window - widget_index_of - widget_close_window - widget_move - widget_resize - widget_move_resize - widget_set_value - widget_animate_value_to - widget_add_value - widget_set_text - widget_use_style - widget_set_text_utf8 - widget_get_text_utf8 - widget_set_child_text_utf8 - widget_set_child_text_with_double - widget_set_child_text_with_int - widget_set_tr_text - widget_get_value - widget_get_text - widget_to_local - widget_to_global - widget_to_screen - widget_set_name - widget_set_theme - widget_set_pointer_cursor - widget_set_animation - widget_create_animator - widget_start_animator - widget_set_animator_time_scale - widget_pause_animator - widget_find_animator - widget_stop_animator - widget_destroy_animator - widget_set_enable - widget_set_feedback - widget_set_auto_adjust_size - widget_set_floating - widget_set_focused - widget_set_focusable - widget_set_state - widget_set_opacity - widget_set_dirty_rect_tolerance - widget_destroy_children - widget_add_child - widget_remove_child - widget_insert_child - widget_restack - widget_child - widget_lookup - widget_lookup_by_type - widget_set_visible - widget_set_visible_only - widget_set_sensitive - widget_on - widget_on_with_tag - widget_off - widget_child_on - widget_off_by_func - widget_off_by_ctx - widget_off_by_tag - widget_invalidate - widget_invalidate_force - widget_paint - widget_draw_text_in_rect - widget_dispatch - widget_dispatch_simple_event - widget_dispatch_recursive - widget_get_prop - widget_get_prop_default_value - widget_set_prop - widget_set_prop_str - widget_get_prop_str - widget_set_prop_pointer - widget_get_prop_pointer - widget_set_prop_int - widget_get_prop_int - widget_set_prop_bool - widget_get_prop_bool - widget_is_window_opened - widget_is_parent_of - widget_is_direct_parent_of - widget_is_window - widget_is_system_bar - widget_is_normal_window - widget_is_dialog - widget_is_popup - widget_is_overlay - widget_is_opened_popup - widget_is_keyboard - widget_is_designing_window - widget_is_window_manager - widget_grab - widget_ungrab - widget_foreach - widget_get_window - widget_get_window_manager - widget_get_type - widget_clone - widget_equal - widget_add_timer - widget_remove_timer - widget_add_idle - widget_load_image - widget_unload_image - widget_load_asset - widget_unload_asset - widget_cast - widget_destroy - widget_destroy_async - widget_ref - widget_unref - widget_paint_helper - widget_draw_background - widget_stroke_border_rect - widget_fill_bg_rect - widget_fill_fg_rect - widget_prepare_text_style - widget_measure_text - widget_dispatch_event_to_target_recursive - widget_is_point_in - widget_dispatch_to_target - widget_dispatch_to_key_target - widget_find_target - widget_re_translate_text - widget_init - widget_create - widget_update_style - widget_update_style_recursive - widget_set_as_key_target - widget_focus_next - widget_focus_prev - widget_get_state_for_style - widget_layout - widget_layout_children - widget_set_self_layout - widget_set_children_layout - widget_set_self_layout_params - widget_set_style_int - widget_set_style_str - widget_set_style_color - widget_take_snapshot - widget_take_snapshot_rect - widget_get_canvas - widget_reset_canvas - widget_on_paint_background - widget_on_paint_self - widget_on_paint_children - widget_on_paint_border - widget_is_instance_of - widget_set_need_relayout_children - widget_ensure_visible_in_viewport - widget_focus_first - widget_get_locale_info - widget_get_image_manager - widget_get_assets_manager - widget_get_font_manager - widget_update_pointer_cursor - widget_begin_wait_pointer_cursor - widget_end_wait_pointer_cursor - widget_set_style - widget_calc_icon_text_rect - widget_set_need_update_style - widget_to_xml - window_animator_factory - window_animator_factory_set - window_animator_factory_create - window_animator_factory_register - window_animator_factory_create_animator - window_animator_factory_destroy - window_animator_create_for_open - window_animator_create_for_close - window_animator_update - window_animator_begin_frame - 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 - tk_dl_error - 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_set_error - 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 - typed_array_create - typed_array_extend - typed_array_get - typed_array_set - typed_array_insert - typed_array_remove - typed_array_pop - typed_array_tail - typed_array_push - typed_array_clear - typed_array_destroy - 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 - tk_str_cmp - tk_str_icmp - tk_watoi - tk_watoi_n - tk_watob - tk_watof - tk_skip_to_num - tk_itoa - tk_ftoa - tk_strtol - tk_strcpy - tk_strncpy - tk_strncpy_s - tk_strdup - tk_wstrdup - tk_strndup - tk_strlen - tk_str_append - tk_memset16 - tk_memset24 - tk_memset32 - tk_memcpy16 - tk_memcpy32 - tk_pixel_copy - tk_snprintf - tk_vsnprintf - tk_sscanf - filename_to_name - filename_to_name_ex - xml_file_expand_read - tk_str_copy - dummy_destroy - default_destroy - pointer_compare - compare_always_equal - tk_is_valid_name - tk_str_start_with - tk_under_score_to_camel - tk_pointer_to_int - tk_pointer_from_int - tk_str_toupper - tk_str_tolower - tk_wstr_dup_utf8 - 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 - xml_parser_create - xml_parser_set_builder - xml_parser_set_trim_text - xml_parser_parse - xml_parser_parse_file - xml_parser_destroy - assets_manager - assets_manager_set - assets_manager_create - assets_manager_init - assets_manager_get_res_root - assets_manager_set_res_root - assets_manager_set_theme - assets_manager_set_system_info - assets_manager_set_locale_info - assets_manager_add - assets_manager_add_data - assets_manager_ref - assets_manager_unref - assets_manager_find_in_cache - assets_manager_load - assets_manager_preload - assets_manager_set_loader - assets_manager_set_custom_build_asset_dir - assets_manager_set_custom_load_asset - assets_manager_clear_cache - assets_manager_clear_all - 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 - window_manager - window_manager_cast - window_manager_set - window_manager_get_top_main_window - window_manager_get_top_window - window_manager_get_prev_window - window_manager_get_pointer_x - window_manager_get_pointer_y - window_manager_get_pointer_pressed - window_manager_is_animating - window_manager_open_window - window_manager_close_window_force - window_manager_paint - window_manager_dispatch_input_event - window_manager_set_show_fps - window_manager_set_screen_saver_time - window_manager_set_cursor - window_manager_back - window_manager_back_to_home - window_manager_back_to - window_manager_switch_to - window_manager_dispatch_native_window_event - window_manager_begin_wait_pointer_cursor - 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 - fscript_ext_init - fscript_math_register - fscript_object_register - fscript_typed_array_register - 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 - ui_binary_writer_init - ui_builder_default - default_ui_loader - xml_ui_loader - ui_xml_writer_init - app_bar_create - app_bar_cast - button_group_create - button_group_cast - button_create - button_cast - button_set_repeat - button_set_long_press_time - button_set_enable_long_press - check_button_create - check_button_create_radio - check_button_set_value - check_button_get_checked_button - check_button_cast - clip_view_create - clip_view_cast - color_tile_create - color_tile_cast - color_tile_set_bg_color - color_tile_set_border_color - color_tile_set_value - column_create - column_cast - combo_box_item_create - combo_box_item_cast - combo_box_item_set_checked - combo_box_item_set_value - dialog_client_create - dialog_client_cast - dialog_title_create - dialog_title_cast - digit_clock_create - digit_clock_cast - digit_clock_set_format - dragger_create - dragger_cast - dragger_set_range - edit_create - edit_cast - edit_get_int - edit_get_double - edit_set_int - edit_set_double - edit_set_text_limit - edit_set_int_limit - edit_set_float_limit - edit_set_readonly - edit_set_cancelable - edit_set_auto_fix - edit_set_select_none_when_focused - edit_set_open_im_when_focused - edit_set_close_im_when_blured - edit_set_input_type - edit_set_action_text - edit_set_tips - edit_set_tr_tips - edit_set_keyboard - edit_set_password_visible - edit_set_focus - edit_set_cursor - edit_set_is_valid_char - edit_set_is_valid_value - edit_set_fix_value - 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 - dialog_create - dialog_create_simple - dialog_cast - dialog_get_title - dialog_get_client - dialog_open - dialog_set_title - dialog_modal - dialog_quit - dialog_is_quited - dialog_is_modal - dialog_toast - 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 - 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 - tk_istream_eos - tk_istream_wait_for_data - tk_istream_flush - tk_istream_read_len - tk_istream_read_line - tk_istream_read_line_str - object_array_create - object_array_clone - object_array_unref - object_array_clear_props - object_compositor_create - object_default_create - object_default_clone - object_default_unref - object_default_clear_props - object_default_find_prop - object_locker_create - object_rbuffer_create - object_typed_array_create - object_wbuffer_create - object_wbuffer_create_extendable - 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 - combo_box_ex_create - 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_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_tcp_create - tk_ostream_udp_create - tk_ostream_udp_set_target_with_host - tk_ostream_udp_set_target_with_addr - tk_iostream_mem_create - tk_istream_mem_create - tk_ostream_mem_create - tk_ostream_retry_create - tk_ostream_retry_set_max_retry_times - tk_ostream_retry_set_max_buffer_size - tk_ostream_retry_clear_buffer - tk_ostream_retry_set_discard_policy - tk_iostream_noisy_create - 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 diff --git a/dllexports/tkc.def b/dllexports/tkc.def deleted file mode 100644 index cb2ce53c9..000000000 --- a/dllexports/tkc.def +++ /dev/null @@ -1,865 +0,0 @@ -LIBRARY tkc -EXPORTS - event_cast - event_create - event_destroy - event_init - emitter_create - emitter_init - emitter_dispatch - emitter_dispatch_simple_event - emitter_on - emitter_exist - emitter_on_with_tag - emitter_off - emitter_off_by_func - emitter_off_by_ctx - emitter_off_by_tag - emitter_set_on_destroy - emitter_find - emitter_enable - emitter_disable - emitter_size - emitter_deinit - 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 - 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 - value_int8 - value_set_uint8 - value_uint8 - value_set_int16 - value_int16 - value_set_uint16 - value_uint16 - value_set_int32 - value_int32 - value_set_uint32 - value_uint32 - value_set_int64 - value_int64 - value_set_uint64 - value_uint64 - value_set_pointer - value_pointer - value_set_float - value_float - value_set_float32 - value_float32 - value_set_double - value_double - value_set_str - value_dup_str - value_dup_str_with_len - value_set_wstr - value_str - value_str_ex - value_wstr - value_is_null - value_equal - value_int - value_set_int - value_set_object - value_object - value_set_token - value_token - value_set_sized_str - value_sized_str - value_set_binary_data - value_dup_binary_data - value_binary_data - value_set_ubjson - value_ubjson - value_copy - value_deep_copy - value_create - value_destroy - value_reset - value_cast - value_type_size - 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 - tk_dl_error - 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_set_error - 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 - typed_array_create - typed_array_extend - typed_array_get - typed_array_set - typed_array_insert - typed_array_remove - typed_array_pop - typed_array_tail - typed_array_push - typed_array_clear - typed_array_destroy - 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 - tk_str_cmp - tk_str_icmp - tk_watoi - tk_watoi_n - tk_watob - tk_watof - tk_skip_to_num - tk_itoa - tk_ftoa - tk_strtol - tk_strcpy - tk_strncpy - tk_strncpy_s - tk_strdup - tk_wstrdup - tk_strndup - tk_strlen - tk_str_append - tk_memset16 - tk_memset24 - tk_memset32 - tk_memcpy16 - tk_memcpy32 - tk_pixel_copy - tk_snprintf - tk_vsnprintf - tk_sscanf - filename_to_name - filename_to_name_ex - xml_file_expand_read - tk_str_copy - dummy_destroy - default_destroy - pointer_compare - compare_always_equal - tk_is_valid_name - tk_str_start_with - tk_under_score_to_camel - tk_pointer_to_int - tk_pointer_from_int - tk_str_toupper - tk_str_tolower - tk_wstr_dup_utf8 - 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 - 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 - 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 - 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 - tk_istream_eos - tk_istream_wait_for_data - tk_istream_flush - tk_istream_read_len - tk_istream_read_line - tk_istream_read_line_str - object_array_create - object_array_clone - object_array_unref - object_array_clear_props - object_compositor_create - object_default_create - object_default_clone - object_default_unref - object_default_clear_props - object_default_find_prop - object_locker_create - object_rbuffer_create - object_typed_array_create - object_wbuffer_create - object_wbuffer_create_extendable - tk_ostream_write - tk_ostream_seek - 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 - conf_obj_set_readonly - 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_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_tcp_create - tk_ostream_udp_create - tk_ostream_udp_set_target_with_host - tk_ostream_udp_set_target_with_addr - tk_iostream_mem_create - tk_istream_mem_create - tk_ostream_mem_create - tk_ostream_retry_create - tk_ostream_retry_set_max_retry_times - tk_ostream_retry_set_max_buffer_size - tk_ostream_retry_clear_buffer - tk_ostream_retry_set_discard_policy - tk_iostream_noisy_create - 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 diff --git a/tools/idl_gen/idl.json b/tools/idl_gen/idl.json deleted file mode 100644 index dedc70077..000000000 --- a/tools/idl_gen/idl.json +++ /dev/null @@ -1,66096 +0,0 @@ -[ - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "event_t*", - "name": "event", - "desc": "event对象。" - } - ], - "annotation": { - "cast": true, - "scriptable": true - }, - "desc": "转换为event对象。\n\n> 供脚本语言使用", - "name": "event_cast", - "return": { - "type": "event_t*", - "desc": "event对象。" - } - }, - { - "params": [ - { - "type": "uint32_t", - "name": "type", - "desc": "事件类型。" - } - ], - "annotation": { - "constructor": true, - "scriptable": true, - "gc": true - }, - "desc": "创建event对象。\n\n主要给脚本语言使用。", - "name": "event_create", - "return": { - "type": "event_t*", - "desc": "返回事件对象。" - } - }, - { - "params": [ - { - "type": "event_t*", - "name": "event", - "desc": "event对象。" - } - ], - "annotation": { - "deconstructor": true, - "scriptable": true, - "gc": true - }, - "desc": "销毁事件对象。\n\n主要给脚本语言使用。", - "name": "event_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "uint32_t", - "name": "type", - "desc": "事件类型。" - }, - { - "type": "void*", - "name": "target", - "desc": "目标对象。" - } - ], - "annotation": { - "constructor": true - }, - "desc": "初始化事件。", - "name": "event_init", - "return": { - "type": "event_t", - "desc": "事件对象。" - } - } - ], - "events": [], - "properties": [ - { - "name": "type", - "desc": "类型。", - "type": "int32_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "size", - "desc": "结构体的大小。", - "type": "int32_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "time", - "desc": "事件发生的时间。", - "type": "uint64_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "target", - "desc": "事件发生的目标对象。", - "type": "void*", - "annotation": { - "readable": true, - "scriptable": true - } - } - ], - "header": "tkc/event.h", - "desc": "事件基类。", - "name": "event_t", - "order": -100, - "annotation": { - "scriptable": true - }, - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [], - "annotation": { - "constructor": true, - "scriptable": true, - "gc": true - }, - "desc": "创建emitter对象。", - "name": "emitter_create", - "return": { - "type": "emitter_t*", - "desc": "对象。" - } - }, - { - "params": [ - { - "type": "emitter_t*", - "name": "emitter", - "desc": "emitter对象。" - } - ], - "annotation": { - "constructor": true - }, - "desc": "初始化emitter对象。", - "name": "emitter_init", - "return": { - "type": "emitter_t*", - "desc": "对象。" - } - }, - { - "params": [ - { - "type": "emitter_t*", - "name": "emitter", - "desc": "emitter对象。" - }, - { - "type": "event_t*", - "name": "e", - "desc": "事件对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "分发事件。如果当前分发的回调函数返回RET_REMOVE,该回调函数将被移出。\n禁用状态下,本函数不做任何事情。", - "name": "emitter_dispatch", - "return": { - "type": "ret_t", - "desc": "如果当前分发的回调函数返回RET_STOP,dispatch中断分发,并返回RET_STOP,否则返回RET_OK。" - } - }, - { - "params": [ - { - "type": "emitter_t*", - "name": "emitter", - "desc": "emitter对象。" - }, - { - "type": "event_type_t", - "name": "type", - "desc": "事件类型。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "分发事件。\n> 对emitter_dispatch的包装,分发一个简单的事件。\n如果当前分发的回调函数返回RET_STOP,dispatch中断分发,并返回RET_STOP,否则返回RET_OK。", - "name": "emitter_dispatch_simple_event", - "return": { - "type": "ret_t", - "desc": "" - } - }, - { - "params": [ - { - "type": "emitter_t*", - "name": "emitter", - "desc": "emitter对象。" - }, - { - "type": "event_type_t", - "name": "etype", - "desc": "事件类型。" - }, - { - "type": "event_func_t", - "name": "handler", - "desc": "事件处理函数。" - }, - { - "type": "void*", - "name": "ctx", - "desc": "事件处理函数上下文。" - } - ], - "annotation": { - "scriptable": "custom" - }, - "desc": "注册指定事件的处理函数。", - "name": "emitter_on", - "return": { - "type": "uint32_t", - "desc": "返回id,用于emitter_off。" - } - }, - { - "params": [ - { - "type": "emitter_t*", - "name": "emitter", - "desc": "emitter对象。" - }, - { - "type": "event_type_t", - "name": "type", - "desc": "事件类型。" - }, - { - "type": "event_func_t", - "name": "on_event", - "desc": "事件处理函数。" - }, - { - "type": "void*", - "name": "ctx", - "desc": "事件处理函数上下文。" - } - ], - "annotation": {}, - "desc": "判断指定的事件和回调函数是否已经注册。", - "name": "emitter_exist", - "return": { - "type": "bool_t", - "desc": "返回TRUE表示已经注册,否则表示没有注册。" - } - }, - { - "params": [ - { - "type": "emitter_t*", - "name": "emitter", - "desc": "emitter对象。" - }, - { - "type": "event_type_t", - "name": "type", - "desc": "事件类型。" - }, - { - "type": "event_func_t", - "name": "on_event", - "desc": "事件处理函数。" - }, - { - "type": "void*", - "name": "ctx", - "desc": "事件处理函数上下文。" - }, - { - "type": "uint32_t", - "name": "tag", - "desc": "tag。" - } - ], - "annotation": {}, - "desc": "注册指定事件的处理函数。", - "name": "emitter_on_with_tag", - "return": { - "type": "uint32_t", - "desc": "返回id,用于emitter_off。" - } - }, - { - "params": [ - { - "type": "emitter_t*", - "name": "emitter", - "desc": "emitter对象。" - }, - { - "type": "uint32_t", - "name": "id", - "desc": "emitter_on返回的ID。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "注销指定事件的处理函数。", - "name": "emitter_off", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "emitter_t*", - "name": "emitter", - "desc": "emitter对象。" - }, - { - "type": "event_type_t", - "name": "type", - "desc": "事件类型。" - }, - { - "type": "event_func_t", - "name": "on_event", - "desc": "事件处理函数。" - }, - { - "type": "void*", - "name": "ctx", - "desc": "事件处理函数上下文。" - } - ], - "annotation": {}, - "desc": "注销指定事件的处理函数。", - "name": "emitter_off_by_func", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "emitter_t*", - "name": "emitter", - "desc": "emitter对象。" - }, - { - "type": "void*", - "name": "ctx", - "desc": "事件处理函数上下文。" - } - ], - "annotation": {}, - "desc": "注销指定事件的处理函数。", - "name": "emitter_off_by_ctx", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "emitter_t*", - "name": "emitter", - "desc": "emitter对象。" - }, - { - "type": "uint32_t", - "name": "tag", - "desc": "tag。" - } - ], - "annotation": {}, - "desc": "注销指定事件的处理函数。", - "name": "emitter_off_by_tag", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "emitter_t*", - "name": "emitter", - "desc": "emitter对象。" - }, - { - "type": "uint32_t", - "name": "id", - "desc": "emitter_on返回的ID。" - }, - { - "type": "tk_destroy_t", - "name": "on_destroy", - "desc": "回调函数。" - }, - { - "type": "void*", - "name": "on_destroy_ctx", - "desc": "回调函数上下文。" - } - ], - "annotation": {}, - "desc": "设置一个回调函数,在emitter被销毁时调用(方便脚本语言去释放回调函数)。", - "name": "emitter_set_on_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "emitter_t*", - "name": "emitter", - "desc": "emitter对象。" - }, - { - "type": "uint32_t", - "name": "id", - "desc": "emitter_on返回的ID。" - } - ], - "annotation": {}, - "desc": "通过ID查找emitter_item_t,主要用于辅助测试。", - "name": "emitter_find", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "emitter_t*", - "name": "emitter", - "desc": "emitter对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "启用。", - "name": "emitter_enable", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "emitter_t*", - "name": "emitter", - "desc": "emitter对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "禁用。\n\n禁用后emitter_dispatch无效,但可以注册和注销。", - "name": "emitter_disable", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "emitter_t*", - "name": "emitter", - "desc": "emitter对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取注册的回调函数个数,主要用于辅助测试。", - "name": "emitter_size", - "return": { - "type": "uint32_t", - "desc": "回调函数个数。" - } - }, - { - "params": [ - { - "type": "emitter_t*", - "name": "emitter", - "desc": "emitter对象。" - } - ], - "annotation": { - "deconstructor": true - }, - "desc": "析构。", - "name": "emitter_deinit", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "emitter_t*", - "name": "emitter", - "desc": "emitter对象。" - } - ], - "annotation": { - "deconstructor": true, - "scriptable": true, - "gc": true - }, - "desc": "销毁。", - "name": "emitter_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "emitter_t*", - "name": "emitter", - "desc": "emitter对象。" - } - ], - "annotation": { - "cast": true, - "scriptable": true - }, - "desc": "转换为emitter对象(供脚本语言使用)。\n\n主要给脚本语言使用。", - "name": "emitter_cast", - "return": { - "type": "emitter_t*", - "desc": "对象。" - } - }, - { - "params": [ - { - "type": "void*", - "name": "ctx", - "desc": "emitter对象。" - }, - { - "type": "event_t*", - "name": "e", - "desc": "分发的事件。" - } - ], - "annotation": {}, - "desc": "分发事件", - "name": "emitter_forward", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [ - { - "name": "items", - "desc": "注册的回调函数集合。", - "type": "emitter_item_t*", - "annotation": { - "private": true - } - }, - { - "name": "next_id", - "desc": "下一次emitter_on返回的ID,emitter_on成功后会自动增加next_id。", - "type": "uint32_t", - "annotation": { - "private": true - } - }, - { - "name": "enable", - "desc": "禁用标志。禁用时dispatch无效。", - "type": "bool_t", - "annotation": { - "readable": true - } - }, - { - "name": "remove_curr_iter", - "desc": "如果在回调函数中,emitter_off当前正在dispatch的回调函数,\n我们只是设置remove_curr_iter为TRUE,在分发完成后才执行。\nXXX: 如果要注销当前正在dispatch的回调函数,直接返回RET_REMOVE是最好的选择。", - "type": "bool_t", - "annotation": { - "private": true - } - }, - { - "name": "curr_iter", - "desc": "当前正在dispatch的项。", - "type": "emitter_item_t*", - "annotation": { - "private": true - } - } - ], - "header": "tkc/emitter.h", - "desc": "事件分发器, 用于实现观察者模式。", - "name": "emitter_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": [], - "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": [ - { - "params": [], - "annotation": { - "constructor": true, - "scriptable": true, - "gc": true - }, - "desc": "创建图片对象(一般供脚本语言中使用)。", - "name": "bitmap_create", - "return": { - "type": "bitmap_t*", - "desc": "返回bitmap对象。" - } - }, - { - "params": [ - { - "type": "uint32_t", - "name": "w", - "desc": "宽度。" - }, - { - "type": "uint32_t", - "name": "h", - "desc": "高度。" - }, - { - "type": "uint32_t", - "name": "line_length", - "desc": "line_length。" - }, - { - "type": "bitmap_format_t", - "name": "format", - "desc": "格式。" - } - ], - "annotation": { - "constructor": true, - "scriptable": true, - "gc": true - }, - "desc": "创建图片对象。", - "name": "bitmap_create_ex", - "return": { - "type": "bitmap_t*", - "desc": "返回bitmap对象。" - } - }, - { - "params": [ - { - "type": "bitmap_t*", - "name": "bitmap", - "desc": "bitmap对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取图片一个像素占用的字节数。", - "name": "bitmap_get_bpp", - "return": { - "type": "uint32_t", - "desc": "返回一个像素占用的字节数。" - } - }, - { - "params": [ - { - "type": "bitmap_t*", - "name": "bitmap", - "desc": "bitmap对象。" - } - ], - "annotation": {}, - "desc": "为读取数据而锁定bitmap的图片缓冲区。", - "name": "bitmap_lock_buffer_for_read", - "return": { - "type": "uint8_t*", - "desc": "返回缓存区的首地址。" - } - }, - { - "params": [ - { - "type": "bitmap_t*", - "name": "bitmap", - "desc": "bitmap对象。" - } - ], - "annotation": {}, - "desc": "为修改数据而锁定bitmap的图片缓冲区。", - "name": "bitmap_lock_buffer_for_write", - "return": { - "type": "uint8_t*", - "desc": "返回缓存区的首地址。" - } - }, - { - "params": [ - { - "type": "bitmap_t*", - "name": "bitmap", - "desc": "bitmap对象。" - } - ], - "annotation": {}, - "desc": "解锁图像缓冲区。", - "name": "bitmap_unlock_buffer", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "bitmap_t*", - "name": "bitmap", - "desc": "bitmap对象。" - }, - { - "type": "uint32_t", - "name": "x", - "desc": "x坐标。" - }, - { - "type": "uint32_t", - "name": "y", - "desc": "y坐标。" - }, - { - "type": "rgba_t*", - "name": "rgba", - "desc": "返回颜色值。" - } - ], - "annotation": {}, - "desc": "获取图片指定像素的rgba颜色值(主要用于测试程序)。", - "name": "bitmap_get_pixel", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "bitmap_t*", - "name": "bitmap", - "desc": "bitmap对象。" - }, - { - "type": "uint32_t", - "name": "line_length", - "desc": "line_length。" - } - ], - "annotation": {}, - "desc": "设置line_length。", - "name": "bitmap_set_line_length", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "bitmap_t*", - "name": "bitmap", - "desc": "bitmap对象。" - } - ], - "annotation": {}, - "desc": "获取每一行占用内存的字节数。", - "name": "bitmap_get_line_length", - "return": { - "type": "ret_t", - "desc": "返回每一行占用内存的字节数。" - } - }, - { - "params": [ - { - "type": "bitmap_t*", - "name": "bitmap", - "desc": "bitmap对象。" - }, - { - "type": "uint32_t", - "name": "w", - "desc": "宽度。" - }, - { - "type": "uint32_t", - "name": "h", - "desc": "高度。" - }, - { - "type": "bitmap_format_t", - "name": "format", - "desc": "格式。" - }, - { - "type": "const uint8_t*", - "name": "", - "desc": "a" - }, - { - "type": "uint32_t", - "name": "comp", - "desc": "颜色通道数(目前支持3(rgb)和4(rgba))。" - } - ], - "annotation": {}, - "desc": "初始化图片。\n数据。3通道时为RGB888格式,4通道时为RGBA888格式(内部拷贝该数据,不会引用,调用者自行释放)。", - "name": "bitmap_init_from_rgba", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "bitmap_t*", - "name": "bitmap", - "desc": "bitmap对象。" - }, - { - "type": "uint32_t", - "name": "w", - "desc": "宽度。" - }, - { - "type": "uint32_t", - "name": "h", - "desc": "高度。" - }, - { - "type": "bitmap_format_t", - "name": "format", - "desc": "格式。" - }, - { - "type": "const uint8_t*", - "name": "data", - "desc": "数据,直接引用,但不负责释放。如果为空,由内部自动分配和释放。" - } - ], - "annotation": {}, - "desc": "初始化图片。", - "name": "bitmap_init", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "bitmap_t*", - "name": "bitmap", - "desc": "bitmap对象。" - }, - { - "type": "const char*", - "name": "filename", - "desc": "文件名。" - } - ], - "annotation": {}, - "desc": "把bitmap保存为png。", - "name": "bitmap_save_png", - "return": { - "type": "bool_t", - "desc": "返回TRUE表示成功,FALSE表示失败。" - } - }, - { - "params": [ - { - "type": "const uint8_t*", - "name": "buff", - "desc": "数据。" - }, - { - "type": "uint32_t", - "name": "w", - "desc": "宽度。" - }, - { - "type": "uint32_t", - "name": "h", - "desc": "高度。" - } - ], - "annotation": { - "static": true - }, - "desc": "dump mono bitmap。", - "name": "bitmap_mono_dump", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "bitmap_t*", - "name": "bitmap", - "desc": "bitmap对象。" - } - ], - "annotation": { - "deconstructor": true, - "scriptable": true, - "gc": true - }, - "desc": "销毁图片(for script only)。", - "name": "bitmap_destroy_with_self", - "alias": "bitmap_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "bitmap_t*", - "name": "bitmap", - "desc": "bitmap对象。" - } - ], - "annotation": { - "deconstructor": true - }, - "desc": "销毁图片。", - "name": "bitmap_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "bitmap_format_t", - "name": "format", - "desc": "位图格式。" - } - ], - "annotation": { - "scriptable": true, - "static": true - }, - "desc": "获取位图格式对应的颜色位数。", - "name": "bitmap_get_bpp_of_format", - "return": { - "type": "uint32_t", - "desc": "成功返回颜色位数,失败返回0。" - } - } - ], - "events": [], - "properties": [ - { - "name": "w", - "desc": "宽度。", - "type": "wh_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "h", - "desc": "高度。", - "type": "wh_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "line_length", - "desc": "每一行实际占用的内存(也称为stride或pitch),一般情况下为w*bpp。", - "type": "uint32_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "flags", - "desc": "标志。请参考{bitmap_flag_t}。", - "type": "uint16_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "format", - "desc": "格式。请参考{bitmap_format_t}。", - "type": "uint16_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "name", - "desc": "名称。", - "type": "const char*", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "buffer", - "desc": "图片数据。", - "type": "graphic_buffer_t*", - "annotation": { - "readable": true - } - } - ], - "header": "base/bitmap.h", - "desc": "位图。", - "name": "bitmap_t", - "order": -9, - "annotation": { - "scriptable": true - }, - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "object_t*", - "name": "obj", - "desc": "object对象。" - } - ], - "annotation": { - "deconstructor": true, - "scriptable": true, - "gc": true - }, - "desc": "引用计数减1。引用计数为0时,销毁对象。", - "name": "object_unref", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "object_t*", - "name": "obj", - "desc": "object对象。" - } - ], - "annotation": { - "constructor": true, - "scriptable": true, - "gc": true - }, - "desc": "引用计数加1。", - "name": "object_ref", - "return": { - "type": "object_t*", - "desc": "返回object对象。" - } - }, - { - "params": [ - { - "type": "object_t*", - "name": "obj", - "desc": "object对象。" - } - ], - "annotation": { - "constructor": true - }, - "desc": "clone对象。", - "name": "object_clone", - "return": { - "type": "object_t*", - "desc": "返回object对象。" - } - }, - { - "params": [ - { - "type": "const object_vtable_t*", - "name": "vt", - "desc": "虚函数表。" - } - ], - "annotation": {}, - "desc": "创建对象。\n\n> 仅供子类调用。", - "name": "object_create", - "return": { - "type": "ret_t", - "desc": "返回object对象。" - } - }, - { - "params": [ - { - "type": "object_t*", - "name": "obj", - "desc": "object对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取对象的类型名称。", - "name": "object_get_type", - "return": { - "type": "const char*", - "desc": "返回对象的类型名称。" - } - }, - { - "params": [ - { - "type": "object_t*", - "name": "obj", - "desc": "object对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取对象的描述信息。", - "name": "object_get_desc", - "return": { - "type": "const char*", - "desc": "返回对象的描述信息。" - } - }, - { - "params": [ - { - "type": "object_t*", - "name": "obj", - "desc": "object对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取对象占用内存的大小。", - "name": "object_get_size", - "return": { - "type": "uint32_t", - "desc": "返回对象占用内存的大小。" - } - }, - { - "params": [ - { - "type": "object_t*", - "name": "obj", - "desc": "object对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "判断对象是否是集合。", - "name": "object_is_collection", - "return": { - "type": "bool_t", - "desc": "返回TRUE表示是集合,否则不是。" - } - }, - { - "params": [ - { - "type": "object_t*", - "name": "obj", - "desc": "object对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "对象的名称。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置对象的名称。", - "name": "object_set_name", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "object_t*", - "name": "obj", - "desc": "object对象。" - }, - { - "type": "object_t*", - "name": "other", - "desc": "比较的object对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "比较两个对象。", - "name": "object_compare", - "return": { - "type": "int", - "desc": "返回比较结果。" - } - }, - { - "params": [ - { - "type": "object_t*", - "name": "obj", - "desc": "object对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "属性的名称。" - }, - { - "type": "value_t*", - "name": "v", - "desc": "返回属性的值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取指定属性的值。", - "name": "object_get_prop", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "object_t*", - "name": "obj", - "desc": "object对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "属性的名称。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取指定属性的字符串类型的值。", - "name": "object_get_prop_str", - "return": { - "type": "const char*", - "desc": "返回指定属性的字符串类型的值。" - } - }, - { - "params": [ - { - "type": "object_t*", - "name": "obj", - "desc": "object对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "属性的名称。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取指定属性的指针类型的值。", - "name": "object_get_prop_pointer", - "return": { - "type": "void*", - "desc": "返回指定属性的指针类型的值。" - } - }, - { - "params": [ - { - "type": "object_t*", - "name": "obj", - "desc": "object对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "属性的名称。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取指定属性的object类型的值。", - "name": "object_get_prop_object", - "return": { - "type": "object_t*", - "desc": "返回指定属性的object类型的值。" - } - }, - { - "params": [ - { - "type": "object_t*", - "name": "obj", - "desc": "object对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "属性的名称。" - }, - { - "type": "int32_t", - "name": "defval", - "desc": "缺省值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取指定属性的整数类型的值。", - "name": "object_get_prop_int", - "return": { - "type": "int32_t", - "desc": "返回指定属性的整数类型的值。" - } - }, - { - "params": [ - { - "type": "object_t*", - "name": "obj", - "desc": "object对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "属性的名称。" - }, - { - "type": "bool_t", - "name": "defval", - "desc": "缺省值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取指定属性的bool类型的值。", - "name": "object_get_prop_bool", - "return": { - "type": "bool_t", - "desc": "返回指定属性的bool类型的值。" - } - }, - { - "params": [ - { - "type": "object_t*", - "name": "obj", - "desc": "object对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "属性的名称。" - }, - { - "type": "float_t", - "name": "defval", - "desc": "缺省值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取指定属性的浮点数类型的值。", - "name": "object_get_prop_float", - "return": { - "type": "float_t", - "desc": "返回指定属性的浮点数类型的值。" - } - }, - { - "params": [ - { - "type": "object_t*", - "name": "obj", - "desc": "object对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "属性的名称。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "删除指定属性。", - "name": "object_remove_prop", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "object_t*", - "name": "obj", - "desc": "object对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "属性的名称。" - }, - { - "type": "value_t*", - "name": "value", - "desc": "属性的值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置指定属性的值。", - "name": "object_set_prop", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "object_t*", - "name": "obj", - "desc": "object对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "属性的名称。" - }, - { - "type": "const char*", - "name": "value", - "desc": "属性的值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置指定属性的字符串类型的值。", - "name": "object_set_prop_str", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "object_t*", - "name": "obj", - "desc": "object对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "属性的名称。" - }, - { - "type": "void*", - "name": "value", - "desc": "属性的值。" - } - ], - "annotation": {}, - "desc": "设置指定属性的指针类型的值。", - "name": "object_set_prop_pointer", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "object_t*", - "name": "obj", - "desc": "object对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "属性的名称。" - }, - { - "type": "object_t*", - "name": "value", - "desc": "属性的值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置指定属性的object类型的值。", - "name": "object_set_prop_object", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "object_t*", - "name": "obj", - "desc": "object对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "属性的名称。" - }, - { - "type": "int32_t", - "name": "value", - "desc": "属性的值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置指定属性的整数类型的值。", - "name": "object_set_prop_int", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "object_t*", - "name": "obj", - "desc": "object对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "属性的名称。" - }, - { - "type": "bool_t", - "name": "value", - "desc": "属性的值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置指定属性的bool类型的值。", - "name": "object_set_prop_bool", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "object_t*", - "name": "obj", - "desc": "object对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "属性的名称。" - }, - { - "type": "float_t", - "name": "value", - "desc": "属性的值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置指定属性的浮点数类型的值。", - "name": "object_set_prop_float", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "object_t*", - "name": "obj", - "desc": "目标对象。" - }, - { - "type": "object_t*", - "name": "src", - "desc": "源对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "属性的名称。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "拷贝指定的属性。", - "name": "object_copy_prop", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "object_t*", - "name": "obj", - "desc": "object对象。" - }, - { - "type": "tk_visit_t", - "name": "on_prop", - "desc": "回调函数。" - }, - { - "type": "void*", - "name": "ctx", - "desc": "回调函数上下文。" - } - ], - "annotation": {}, - "desc": "遍历所有属性。", - "name": "object_foreach_prop", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "object_t*", - "name": "obj", - "desc": "object对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "属性的名称。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "检查是否存在指定的属性。", - "name": "object_has_prop", - "return": { - "type": "bool_t", - "desc": "返回TRUE表示存在,否则表示不存在。" - } - }, - { - "params": [ - { - "type": "object_t*", - "name": "obj", - "desc": "object对象。" - }, - { - "type": "const char*", - "name": "expr", - "desc": "表达式。" - }, - { - "type": "value_t*", - "name": "v", - "desc": "返回计算结果。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "计算一个表达式,表达式中引用的变量从prop中获取。", - "name": "object_eval", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "object_t*", - "name": "obj", - "desc": "object对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "命令的名称。" - }, - { - "type": "const char*", - "name": "args", - "desc": "命令的参数。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "检查是否可以执行指定的命令。", - "name": "object_can_exec", - "return": { - "type": "bool_t", - "desc": "返回TRUE表示可以执行,否则表示不可以执行。" - } - }, - { - "params": [ - { - "type": "object_t*", - "name": "obj", - "desc": "object对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "命令的名称。" - }, - { - "type": "const char*", - "name": "args", - "desc": "命令的参数。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "执行指定的命令。", - "name": "object_exec", - "alias": "execute", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "object_t*", - "name": "obj", - "desc": "object对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "触发EVT_PROPS_CHANGED事件。", - "name": "object_notify_changed", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "object_t*", - "name": "obj", - "desc": "object对象。" - }, - { - "type": "const char*", - "name": "path", - "desc": "属性的path,各级之间用.分隔。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "检查是否存在指定的属性。", - "name": "object_has_prop_by_path", - "return": { - "type": "bool_t", - "desc": "返回TRUE表示存在,否则表示不存在。" - } - }, - { - "params": [ - { - "type": "object_t*", - "name": "obj", - "desc": "object对象。" - }, - { - "type": "const char*", - "name": "path", - "desc": "属性的path,各级之间用.分隔。" - }, - { - "type": "value_t*", - "name": "v", - "desc": "返回属性的值。" - } - ], - "annotation": {}, - "desc": "获取指定path属性的值。", - "name": "object_get_prop_by_path", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "object_t*", - "name": "obj", - "desc": "object对象。" - }, - { - "type": "const char*", - "name": "path", - "desc": "属性的path。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取指定属性的字符串类型的值。", - "name": "object_get_prop_str_by_path", - "return": { - "type": "const char*", - "desc": "返回指定属性的字符串类型的值。" - } - }, - { - "params": [ - { - "type": "object_t*", - "name": "obj", - "desc": "object对象。" - }, - { - "type": "const char*", - "name": "path", - "desc": "属性的path。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取指定属性的指针类型的值。", - "name": "object_get_prop_pointer_by_path", - "return": { - "type": "void*", - "desc": "返回指定属性的指针类型的值。" - } - }, - { - "params": [ - { - "type": "object_t*", - "name": "obj", - "desc": "object对象。" - }, - { - "type": "const char*", - "name": "path", - "desc": "属性的path。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取指定属性的object类型的值。", - "name": "object_get_prop_object_by_path", - "return": { - "type": "object_t*", - "desc": "返回指定属性的object类型的值。" - } - }, - { - "params": [ - { - "type": "object_t*", - "name": "obj", - "desc": "object对象。" - }, - { - "type": "const char*", - "name": "path", - "desc": "属性的path。" - }, - { - "type": "int32_t", - "name": "defval", - "desc": "缺省值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取指定属性的整数类型的值。", - "name": "object_get_prop_int_by_path", - "return": { - "type": "int32_t", - "desc": "返回指定属性的整数类型的值。" - } - }, - { - "params": [ - { - "type": "object_t*", - "name": "obj", - "desc": "object对象。" - }, - { - "type": "const char*", - "name": "path", - "desc": "属性的path。" - }, - { - "type": "bool_t", - "name": "defval", - "desc": "缺省值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取指定属性的bool类型的值。", - "name": "object_get_prop_bool_by_path", - "return": { - "type": "bool_t", - "desc": "返回指定属性的bool类型的值。" - } - }, - { - "params": [ - { - "type": "object_t*", - "name": "obj", - "desc": "object对象。" - }, - { - "type": "const char*", - "name": "path", - "desc": "属性的path。" - }, - { - "type": "float_t", - "name": "defval", - "desc": "缺省值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取指定属性的浮点数类型的值。\n\ne", - "name": "object_get_prop_float_by_path", - "return": { - "type": "float_t", - "desc": "返回指定属性的浮点数类型的值。" - } - }, - { - "params": [ - { - "type": "object_t*", - "name": "obj", - "desc": "object对象。" - }, - { - "type": "const char*", - "name": "path", - "desc": "属性的path。" - }, - { - "type": "value_t*", - "name": "value", - "desc": "属性的值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置指定属性的值。", - "name": "object_set_prop_by_path", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "object_t*", - "name": "obj", - "desc": "object对象。" - }, - { - "type": "const char*", - "name": "path", - "desc": "属性的path。" - }, - { - "type": "const char*", - "name": "value", - "desc": "属性的值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置指定属性的字符串类型的值。", - "name": "object_set_prop_str_by_path", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "object_t*", - "name": "obj", - "desc": "object对象。" - }, - { - "type": "const char*", - "name": "path", - "desc": "属性的path。" - }, - { - "type": "void*", - "name": "value", - "desc": "属性的值。" - } - ], - "annotation": {}, - "desc": "设置指定属性的指针类型的值。", - "name": "object_set_prop_pointer_by_path", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "object_t*", - "name": "obj", - "desc": "object对象。" - }, - { - "type": "const char*", - "name": "path", - "desc": "属性的path。" - }, - { - "type": "object_t*", - "name": "value", - "desc": "属性的值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置指定属性的object类型的值。", - "name": "object_set_prop_object_by_path", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "object_t*", - "name": "obj", - "desc": "object对象。" - }, - { - "type": "const char*", - "name": "path", - "desc": "属性的path。" - }, - { - "type": "int32_t", - "name": "value", - "desc": "属性的值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置指定属性的整数类型的值。", - "name": "object_set_prop_int_by_path", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "object_t*", - "name": "obj", - "desc": "object对象。" - }, - { - "type": "const char*", - "name": "path", - "desc": "属性的path。" - }, - { - "type": "bool_t", - "name": "value", - "desc": "属性的值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置指定属性的bool类型的值。", - "name": "object_set_prop_bool_by_path", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "object_t*", - "name": "obj", - "desc": "object对象。" - }, - { - "type": "const char*", - "name": "path", - "desc": "属性的path。" - }, - { - "type": "float_t", - "name": "value", - "desc": "属性的值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置指定属性的浮点数类型的值。", - "name": "object_set_prop_float_by_path", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "object_t*", - "name": "obj", - "desc": "object对象。" - }, - { - "type": "const char*", - "name": "path", - "desc": "命令的path。" - }, - { - "type": "const char*", - "name": "args", - "desc": "命令的参数。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "检查是否可以执行指定的命令。", - "name": "object_can_exec_by_path", - "return": { - "type": "bool_t", - "desc": "返回TRUE表示可以执行,否则表示不可以执行。" - } - }, - { - "params": [ - { - "type": "object_t*", - "name": "obj", - "desc": "object对象。" - }, - { - "type": "const char*", - "name": "path", - "desc": "命令的path。" - }, - { - "type": "const char*", - "name": "args", - "desc": "命令的参数。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "执行指定的命令。", - "name": "object_exec_by_path", - "alias": "execute_by_path", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [ - { - "name": "ref_count", - "desc": "引用计数。", - "type": "int32_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "name", - "desc": "对象的名称。", - "type": "char*", - "annotation": { - "readable": true, - "scriptable": true - } - } - ], - "header": "tkc/object.h", - "desc": "对象接口。", - "name": "object_t", - "order": -9, - "parent": "emitter_t", - "annotation": { - "scriptable": true - }, - "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": "对象。" - } - }, - { - "params": [ - { - "type": "value_type_t", - "name": "type", - "desc": "类型。" - } - ], - "annotation": { - "static": true - }, - "desc": "获取指定类型数据大小。", - "name": "value_type_size", - "return": { - "type": "uint32_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": [ - { - "params": [ - { - "type": "wh_t", - "name": "w", - "desc": "LCD宽度。" - }, - { - "type": "wh_t", - "name": "h", - "desc": "LCD高度。" - }, - { - "type": "app_type_t", - "name": "app_type", - "desc": "应用程序的类型。" - }, - { - "type": "const char*", - "name": "app_name", - "desc": "应用程序的名称(必须为常量字符串)。" - }, - { - "type": "const char*", - "name": "app_root", - "desc": "应用程序的根目录,用于定位资源文件(必须为常量字符串)。" - } - ], - "annotation": { - "static": true, - "scriptable": true - }, - "desc": "初始化TK。", - "name": "tk_init", - "alias": "init", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [], - "annotation": { - "static": true, - "scriptable": true - }, - "desc": "进入TK事件主循环。", - "name": "tk_run", - "alias": "run", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [], - "annotation": { - "static": true, - "scriptable": true - }, - "desc": "退出TK事件主循环。", - "name": "tk_quit", - "alias": "global_quit", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [], - "annotation": { - "static": true, - "scriptable": true - }, - "desc": "获取全局指针的X坐标。", - "name": "tk_get_pointer_x", - "alias": "global_get_pointer_x", - "return": { - "type": "int32_t", - "desc": "返回全局指针的X坐标。" - } - }, - { - "params": [], - "annotation": { - "static": true, - "scriptable": true - }, - "desc": "获取全局指针的Y坐标。", - "name": "tk_get_pointer_y", - "alias": "global_get_pointer_y", - "return": { - "type": "int32_t", - "desc": "返回全局指针的X坐标。" - } - }, - { - "params": [], - "annotation": { - "static": true, - "scriptable": true - }, - "desc": "获取全局指针是否按下。", - "name": "tk_is_pointer_pressed", - "alias": "global_is_pointer_pressed", - "return": { - "type": "bool_t", - "desc": "返回全局指针是否按下。" - } - }, - { - "params": [ - { - "type": "int", - "name": "orientation", - "desc": "旋转方向。" - } - ], - "annotation": {}, - "desc": "设置屏幕的旋转方向(XXX:目前仅支持0度和90度)。", - "name": "tk_set_lcd_orientation", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [], - "annotation": {}, - "desc": "初始化资源。", - "name": "tk_init_assets", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [], - "annotation": {}, - "desc": "init。\n> public for test program", - "name": "tk_init_internal", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [], - "annotation": {}, - "desc": "deinit。\n> public for test program", - "name": "tk_deinit_internal", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [], - "annotation": {}, - "desc": "public for web", - "name": "tk_exit", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [], - "annotation": {}, - "desc": "判断当前线程是否是UI线程。", - "name": "tk_is_ui_thread", - "return": { - "type": "bool_t", - "desc": "返回TRUE表示是,否则表示否。" - } - }, - { - "params": [ - { - "type": "tk_callback_t", - "name": "func", - "desc": "函数。" - }, - { - "type": "void*", - "name": "ctx", - "desc": "回调函数的上下文。" - }, - { - "type": "bool_t", - "name": "wait_until_done", - "desc": "是否等待完成。" - } - ], - "annotation": {}, - "desc": "后台线程在UI线程执行指定的函数。", - "name": "tk_run_in_ui_thread", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [], - "annotation": {}, - "desc": "创建缺省的资源加载器。", - "name": "asset_loader_default_create", - "return": { - "type": "asset_loader_t*", - "desc": "返回loader对象。" - } - }, - { - "params": [ - { - "type": "const char*", - "name": "zipfile", - "desc": "zip文件名。" - } - ], - "annotation": {}, - "desc": "创建zip资源加载器。", - "name": "asset_loader_zip_create", - "return": { - "type": "asset_loader_t*", - "desc": "返回loader对象。" - } - }, - { - "params": [ - { - "type": "data_reader_t*", - "name": "reader", - "desc": "reader对象。" - }, - { - "type": "bool_t", - "name": "own_the_reader", - "desc": "如果希望销毁loader时销毁reader,请设置为TRUE。" - } - ], - "annotation": {}, - "desc": "创建zip资源加载器。", - "name": "asset_loader_zip_create_with_reader", - "return": { - "type": "asset_loader_t*", - "desc": "返回loader对象。" - } - } - ], - "events": [], - "properties": [], - "header": "src/awtk_global.h", - "desc": "TK全局对象。", - "name": "global_t", - "annotation": { - "scriptable": true, - "fake": true - }, - "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": [ - { - "params": [], - "annotation": { - "constructor": true - }, - "desc": "获取缺省的子控件布局算法工厂对象。", - "name": "children_layouter_factory", - "return": { - "type": "children_layouter_factory_t*", - "desc": "返回子控件布局算法工厂对象。" - } - }, - { - "params": [ - { - "type": "children_layouter_factory_t*", - "name": "factory", - "desc": "子控件布局算法工厂对象。" - } - ], - "annotation": {}, - "desc": "设置缺省的子控件布局算法工厂对象。", - "name": "children_layouter_factory_set", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [], - "annotation": { - "constructor": true - }, - "desc": "创建子控件布局算法工厂对象。", - "name": "children_layouter_factory_create", - "return": { - "type": "children_layouter_factory_t*", - "desc": "返回子控件布局算法工厂对象。" - } - }, - { - "params": [ - { - "type": "children_layouter_factory_t*", - "name": "factory", - "desc": "layouter工厂对象。" - }, - { - "type": "const char*", - "name": "type", - "desc": "子控件布局算法类型。" - }, - { - "type": "children_layouter_create_t", - "name": "create", - "desc": "子控件布局算法创建函数。" - } - ], - "annotation": {}, - "desc": "注册子控件布局算法创建函数。", - "name": "children_layouter_factory_register", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "children_layouter_factory_t*", - "name": "factory", - "desc": "子控件布局算法工厂对象。" - }, - { - "type": "const char*", - "name": "type", - "desc": "类型。" - } - ], - "annotation": { - "constructor": true - }, - "desc": "创建指定类型的子控件布局算法对象。", - "name": "children_layouter_factory_create_layouter", - "return": { - "type": "children_layouter_t*", - "desc": "返回子控件布局算法对象。" - } - }, - { - "params": [ - { - "type": "children_layouter_factory_t*", - "name": "factory", - "desc": "子控件布局算法工厂对象。" - } - ], - "annotation": {}, - "desc": "析构并释放子控件布局算法工厂对象。", - "name": "children_layouter_factory_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [], - "header": "base/children_layouter_factory.h", - "desc": "子控件布局算法工厂。", - "name": "children_layouter_factory_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "children_layouter_t*", - "name": "layouter", - "desc": "layouter对象。" - } - ], - "annotation": {}, - "desc": "获取全部参数。", - "name": "children_layouter_to_string", - "return": { - "type": "ret_t", - "desc": "返回字符串格式的参数。" - } - }, - { - "params": [ - { - "type": "children_layouter_t*", - "name": "layouter", - "desc": "layouter对象。" - }, - { - "type": "widget_t*", - "name": "widget", - "desc": "控件。" - } - ], - "annotation": {}, - "desc": "对控件的子控件进行布局。", - "name": "children_layouter_layout", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "children_layouter_t*", - "name": "layouter", - "desc": "layouter对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "参数名。" - }, - { - "type": "value_t*", - "name": "v", - "desc": "返回参数的值。" - } - ], - "annotation": {}, - "desc": "获取指定的参数。", - "name": "children_layouter_get_param", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "children_layouter_t*", - "name": "layouter", - "desc": "layouter对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "参数名。" - }, - { - "type": "const value_t*", - "name": "v", - "desc": "参数的值。" - } - ], - "annotation": {}, - "desc": "获取指定的参数。", - "name": "children_layouter_set_param", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "children_layouter_t*", - "name": "layouter", - "desc": "layouter对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "参数名。" - }, - { - "type": "const char*", - "name": "value", - "desc": "参数值。" - } - ], - "annotation": {}, - "desc": "设置字符串格式的参数。", - "name": "children_layouter_set_param_str", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "children_layouter_t*", - "name": "layouter", - "desc": "layouter对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "参数名。" - }, - { - "type": "float_t", - "name": "defval", - "desc": "缺省值。" - } - ], - "annotation": {}, - "desc": "获取指定的浮点格式的参数。", - "name": "children_layouter_get_param_float", - "return": { - "type": "ret_t", - "desc": "成功返回参数的值,失败返回缺省值。" - } - }, - { - "params": [ - { - "type": "children_layouter_t*", - "name": "layouter", - "desc": "layouter对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "参数名。" - }, - { - "type": "int32_t", - "name": "defval", - "desc": "缺省值。" - } - ], - "annotation": {}, - "desc": "获取指定的整数格式的参数。", - "name": "children_layouter_get_param_int", - "return": { - "type": "ret_t", - "desc": "成功返回参数的值,失败返回缺省值。" - } - }, - { - "params": [ - { - "type": "children_layouter_t*", - "name": "layouter", - "desc": "layouter对象。" - } - ], - "annotation": {}, - "desc": "判断layouter对象是否有效。", - "name": "children_layouter_is_valid", - "return": { - "type": "bool_t", - "desc": "返回TRUE表示有效,否则表示无效。" - } - }, - { - "params": [ - { - "type": "children_layouter_t*", - "name": "layouter", - "desc": "layouter对象。" - } - ], - "annotation": {}, - "desc": "销毁layouter对象。", - "name": "children_layouter_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "const char*", - "name": "params", - "desc": "参数。" - } - ], - "annotation": {}, - "desc": "创建layouter对象。", - "name": "children_layouter_create", - "return": { - "type": "children_layouter_t*", - "desc": "返回layouter对象。" - } - }, - { - "params": [ - { - "type": "children_layouter_t*", - "name": "layouter", - "desc": "被克隆的对象。" - } - ], - "annotation": {}, - "desc": "克隆layouter对象。", - "name": "children_layouter_clone", - "return": { - "type": "children_layouter_t*", - "desc": "返回layouter对象。" - } - } - ], - "events": [], - "properties": [], - "header": "base/children_layouter.h", - "desc": "子控件排版布局器的接口。\n\n按特定算法对子控件进行排版布局,子类需要实现vtable中的函数。", - "name": "children_layouter_t", - "level": 1 - }, - { - "type": "enum", - "desc": "剪切板数据类型定义。", - "consts": [ - { - "desc": "无数据。", - "name": "CLIP_BOARD_DATA_TYPE_NONE" - }, - { - "desc": "UTF8文本。", - "name": "CLIP_BOARD_DATA_TYPE_TEXT" - } - ], - "header": "base/clip_board.h", - "name": "clip_board_data_type_t", - "prefix": "CLIP_BOARD_DATA_TYPE_", - "annotation": { - "scriptable": true - }, - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [], - "annotation": { - "constructor": true - }, - "desc": "获取缺省的剪切板对象。", - "name": "clip_board", - "alias": "clip_board_instance", - "return": { - "type": "ret_t", - "desc": "返回缺省剪切板对象。" - } - }, - { - "params": [ - { - "type": "clip_board_t*", - "name": "cl", - "desc": "剪切板对象。" - } - ], - "annotation": {}, - "desc": "设置缺省的剪切板对象。", - "name": "clip_board_set", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "clip_board_t*", - "name": "cl", - "desc": "剪切板对象。" - } - ], - "annotation": {}, - "desc": "清空剪切板中的数据。", - "name": "clip_board_clear", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "clip_board_t*", - "name": "cl", - "desc": "剪切板对象。" - }, - { - "type": "clip_board_data_type_t", - "name": "type", - "desc": "数据类型。" - }, - { - "type": "const void* data", - "name": "data", - "desc": "数据。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "数据长度" - } - ], - "annotation": {}, - "desc": "设置数据到剪切板中。", - "name": "clip_board_set_data", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "clip_board_t*", - "name": "cl", - "desc": "剪切板对象。" - }, - { - "type": "clip_board_data_type_t*", - "name": "type", - "desc": "返回数据类型(可为NULL)。" - }, - { - "type": "void** data", - "name": "data", - "desc": "返回数据(可为NULL)。" - }, - { - "type": "uint32_t*", - "name": "size", - "desc": "返回数据长度(可为NULL)。" - } - ], - "annotation": {}, - "desc": "从剪切板中获取数据。", - "name": "clip_board_get_data", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "clip_board_t*", - "name": "cl", - "desc": "剪切板对象。" - } - ], - "annotation": {}, - "desc": "销毁剪切板对象。", - "name": "clip_board_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "const char*", - "name": "text", - "desc": "文本。" - } - ], - "annotation": { - "static": true, - "scriptable": true - }, - "desc": "设置文本(UTF8)数据到剪切板。", - "name": "clip_board_set_text", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [], - "annotation": { - "static": true, - "scriptable": true - }, - "desc": "从剪切板中获取文本(UTF8)数据。", - "name": "clip_board_get_text", - "return": { - "type": "const char*", - "desc": "返回文本数据。" - } - } - ], - "events": [], - "properties": [], - "header": "base/clip_board.h", - "desc": "剪切板接口。", - "name": "clip_board_t", - "annotation": { - "scriptable": true - }, - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [], - "annotation": { - "constructor": true - }, - "desc": "获取缺省的对话框高亮策略工厂对象。", - "name": "dialog_highlighter_factory", - "return": { - "type": "dialog_highlighter_factory_t*", - "desc": "返回对话框高亮策略工厂对象。" - } - }, - { - "params": [ - { - "type": "dialog_highlighter_factory_t*", - "name": "factory", - "desc": "对话框高亮策略工厂对象。" - } - ], - "annotation": {}, - "desc": "设置缺省的对话框高亮策略工厂对象。", - "name": "dialog_highlighter_factory_set", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [], - "annotation": { - "constructor": true - }, - "desc": "创建对话框高亮策略工厂对象。", - "name": "dialog_highlighter_factory_create", - "return": { - "type": "dialog_highlighter_factory_t*", - "desc": "返回对话框高亮策略工厂对象。" - } - }, - { - "params": [ - { - "type": "dialog_highlighter_factory_t*", - "name": "factory", - "desc": "highlighter工厂对象。" - }, - { - "type": "const char*", - "name": "type", - "desc": "对话框高亮策略类型。" - }, - { - "type": "dialog_highlighter_create_t", - "name": "create", - "desc": "对话框高亮策略创建函数。" - } - ], - "annotation": {}, - "desc": "注册对话框高亮策略创建函数。", - "name": "dialog_highlighter_factory_register", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "dialog_highlighter_factory_t*", - "name": "factory", - "desc": "对话框高亮策略工厂对象。" - }, - { - "type": "const char*", - "name": "args", - "desc": "参数。如default(alpha=90)" - }, - { - "type": "widget_t*", - "name": "dialog", - "desc": "对话框对象。" - } - ], - "annotation": { - "constructor": true - }, - "desc": "创建指定类型的对话框高亮策略对象。", - "name": "dialog_highlighter_factory_create_highlighter", - "return": { - "type": "dialog_highlighter_t*", - "desc": "返回窗口动画对象。" - } - }, - { - "params": [ - { - "type": "dialog_highlighter_factory_t*", - "name": "factory", - "desc": "对话框高亮策略工厂对象。" - } - ], - "annotation": {}, - "desc": "析构并释放对话框高亮策略工厂对象。", - "name": "dialog_highlighter_factory_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [], - "header": "base/dialog_highlighter_factory.h", - "desc": "对话框高亮策略工厂。", - "name": "dialog_highlighter_factory_t", - "level": 1 - }, - { - "type": "enum", - "desc": "@type string\n内置的对话框高亮策略。", - "consts": [ - { - "desc": "缺省的对话框高亮策略。", - "name": "DIALOG_HIGHLIGHTER_DEFAULT" - } - ], - "header": "base/dialog_highlighter.h", - "name": "dialog_highlighter_type_t", - "prefix": "DIALOG_HIGHLIGHTER_", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "const dialog_highlighter_vtable_t*", - "name": "vt", - "desc": "虚表对象。" - } - ], - "annotation": {}, - "desc": "创建对话框高亮策略对象。\n\n>供子类构造函数用。", - "name": "dialog_highlighter_create", - "return": { - "type": "dialog_highlighter_t*", - "desc": "返回对话框高亮策略对象" - } - }, - { - "params": [ - { - "type": "dialog_highlighter_t*", - "name": "h", - "desc": "对话框高亮策略对象。" - }, - { - "type": "bitmap_t*", - "name": "img", - "desc": "背景截图。" - } - ], - "annotation": {}, - "desc": "设置背景图片。", - "name": "dialog_highlighter_set_bg", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "dialog_highlighter_t*", - "name": "h", - "desc": "对话框高亮策略对象。" - }, - { - "type": "rect_t*", - "name": "clip_rect", - "desc": "背景显示裁减区。" - } - ], - "annotation": {}, - "desc": "设置背景图片的显示裁减区。", - "name": "dialog_highlighter_set_bg_clip_rect", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "dialog_highlighter_t*", - "name": "h", - "desc": "对话框高亮策略对象。" - }, - { - "type": "canvas_t*", - "name": "c", - "desc": "画布。" - } - ], - "annotation": {}, - "desc": "初始化。在绘制完背景,在截图前调用。", - "name": "dialog_highlighter_prepare", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "dialog_highlighter_t*", - "name": "h", - "desc": "对话框高亮策略对象。" - }, - { - "type": "canvas_t*", - "name": "c", - "desc": "画布。" - }, - { - "type": "canvas_t*", - "name": "canvas_offline", - "desc": "离线画布。" - } - ], - "annotation": {}, - "desc": "初始化。在绘制完背景,在截图前调用。", - "name": "dialog_highlighter_prepare_ex", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "dialog_highlighter_t*", - "name": "h", - "desc": "对话框高亮策略对象。" - }, - { - "type": "uint8_t", - "name": "alpha", - "desc": "设置 sytem_bar 的高亮透明值。" - } - ], - "annotation": {}, - "desc": "设置 sytem_bar 的高亮透明值。", - "name": "dialog_highlighter_set_system_bar_alpha", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "dialog_highlighter_t*", - "name": "h", - "desc": "对话框高亮策略对象。" - }, - { - "type": "float_t", - "name": "percent", - "desc": "高亮的百分比。" - } - ], - "annotation": {}, - "desc": "获取高亮的透明度。", - "name": "dialog_highlighter_get_alpha", - "return": { - "type": "uint8_t", - "desc": "返回透明度。" - } - }, - { - "params": [ - { - "type": "dialog_highlighter_t*", - "name": "h", - "desc": "对话框高亮策略对象。" - }, - { - "type": "float_t", - "name": "percent", - "desc": "动画进度(0-1),1表示打开已经完成。" - } - ], - "annotation": {}, - "desc": "绘制背景。", - "name": "dialog_highlighter_draw", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "dialog_highlighter_t*", - "name": "h", - "desc": "对话框高亮策略对象。" - }, - { - "type": "canvas_t*", - "name": "c", - "desc": "画布。" - }, - { - "type": "float_t", - "name": "percent", - "desc": "高亮的百分比。" - } - ], - "annotation": {}, - "desc": "绘制背景高亮部分。", - "name": "dialog_highlighter_draw_mask", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "dialog_highlighter_t*", - "name": "h", - "desc": "对话框高亮策略对象。" - } - ], - "annotation": {}, - "desc": "是否是动态绘制(方便外层优化)。", - "name": "dialog_highlighter_is_dynamic", - "return": { - "type": "bool_t", - "desc": "返回TRUE表示动态绘制,否则表示不是动态绘制。" - } - }, - { - "params": [ - { - "type": "dialog_highlighter_t*", - "name": "h", - "desc": "对话框高亮策略对象。" - } - ], - "annotation": {}, - "desc": "销毁对话框高亮策略对象。", - "name": "dialog_highlighter_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [ - { - "name": "img", - "desc": "底层窗口的截图。", - "type": "bitmap_t" - }, - { - "name": "canvas", - "desc": "画布。", - "type": "canvas_t*" - }, - { - "name": "dialog", - "desc": "对应的对话框。", - "type": "widget_t*" - }, - { - "name": "clip_rect", - "desc": "截图的显示裁减区", - "type": "rect_t*" - } - ], - "header": "base/dialog_highlighter.h", - "desc": "对话框高亮策略。\n\n> 高亮策略的基本思路是对背景进行处理,比如将背景变暗或变模糊。", - "name": "dialog_highlighter_t", - "level": 1 - }, - { - "type": "enum", - "desc": "对话框退出码。\n\n> 一般用作dialog_quit函数的参数。", - "consts": [ - { - "desc": "对话框被强行关闭或不关心关闭原因。", - "name": "DIALOG_QUIT_NONE" - }, - { - "desc": "点击“OK”按钮关闭。", - "name": "DIALOG_QUIT_OK" - }, - { - "desc": "点击“YES”按钮关闭。", - "name": "DIALOG_QUIT_YES" - }, - { - "desc": "点击“CANCEL”按钮关闭。", - "name": "DIALOG_QUIT_CANCEL" - }, - { - "desc": "点击“NO”按钮关闭。", - "name": "DIALOG_QUIT_NO" - }, - { - "desc": "点击其它按钮关闭。", - "name": "DIALOG_QUIT_OTHER" - } - ], - "header": "base/dialog.h", - "name": "dialog_quit_code_t", - "prefix": "DIALOG_QUIT_", - "annotation": { - "scriptable": true - }, - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "uint32_t", - "name": "value", - "desc": "资源的类型。" - } - ], - "annotation": {}, - "desc": "获取资源类型枚值和名称的对应关系。", - "name": "asset_type_find_by_value", - "return": { - "type": "const key_type_value_t*", - "desc": "返回资源类型枚值和名称的对应关系。" - } - }, - { - "params": [ - { - "type": "const key_type_value_t*", - "name": "items", - "desc": "特定枚举值对应列表。" - }, - { - "type": "uint32_t", - "name": "nr", - "desc": "列表长度。" - }, - { - "type": "const char*", - "name": "name", - "desc": "名称。" - } - ], - "annotation": {}, - "desc": "获取特定枚值和名称的对应关系。", - "name": "find_item", - "return": { - "type": "const key_type_value_t*", - "desc": "返回资源类型枚值和名称的对应关系。" - } - }, - { - "params": [ - { - "type": "const key_type_value_t*", - "name": "items", - "desc": "特定枚举值对应列表。" - }, - { - "type": "uint32_t", - "name": "nr", - "desc": "列表长度。" - }, - { - "type": "uint32_t", - "name": "value", - "desc": "资源的类型。" - } - ], - "annotation": {}, - "desc": "获取特定枚值和名称的对应关系。", - "name": "find_item_by_value", - "return": { - "type": "const key_type_value_t*", - "desc": "返回资源类型枚值和名称的对应关系。" - } - }, - { - "params": [ - { - "type": "const char*", - "name": "name", - "desc": "按键名。" - } - ], - "annotation": {}, - "desc": "获取按键值和名称的对应关系。", - "name": "keys_type_find", - "return": { - "type": "const key_type_value_t*", - "desc": "返回按键值和名称的对应关系。" - } - }, - { - "params": [ - { - "type": "uint32_t", - "name": "value", - "desc": "按键值。" - } - ], - "annotation": {}, - "desc": "获取按键值和名称的对应关系。", - "name": "keys_type_find_by_value", - "return": { - "type": "const key_type_value_t*", - "desc": "返回按键值和名称的对应关系。" - } - } - ], - "events": [], - "properties": [], - "header": "base/enums.h", - "desc": "", - "name": "enum_helper", - "annotation": { - "fake": true - }, - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "const char*", - "name": "filename", - "desc": "用于保存事件的文件名。" - } - ], - "annotation": { - "static": true - }, - "desc": "开始事件记录。", - "name": "event_recorder_player_start_record", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "const char*", - "name": "filename", - "desc": "存放事件的文件名。" - }, - { - "type": "uint32_t", - "name": "times", - "desc": "循环播放的次数。" - } - ], - "annotation": { - "static": true - }, - "desc": "开始事件重放。", - "name": "event_recorder_player_start_play", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [], - "annotation": { - "static": true - }, - "desc": "停止事件记录。", - "name": "event_recorder_player_stop_record", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [], - "annotation": { - "static": true - }, - "desc": "停止事件重放。", - "name": "event_recorder_player_stop_play", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [], - "header": "base/event_recorder_player.h", - "desc": "事件录制与重放,用于辅助自动测试和压力测试。", - "name": "event_recorder_player_t", - "annotation": { - "fake": true - }, - "level": 1 - }, - { - "type": "enum", - "desc": "类型常量定义。", - "consts": [ - { - "desc": "指针按下事件名(pointer_event_t)。", - "name": "EVT_POINTER_DOWN" - }, - { - "desc": "指针按下事件名,在子控件处理之前触发(pointer_event_t)。", - "name": "EVT_POINTER_DOWN_BEFORE_CHILDREN" - }, - { - "desc": "指针移动事件名(pointer_event_t)。", - "name": "EVT_POINTER_MOVE" - }, - { - "desc": "指针移动事件名,在子控件处理之前触发(pointer_event_t)。", - "name": "EVT_POINTER_MOVE_BEFORE_CHILDREN" - }, - { - "desc": "指针抬起事件名(pointer_event_t)。", - "name": "EVT_POINTER_UP" - }, - { - "desc": "指针抬起事件名,在子控件处理之前触发(pointer_event_t)。", - "name": "EVT_POINTER_UP_BEFORE_CHILDREN" - }, - { - "desc": "滚轮事件名(wheel_event_t)。", - "name": "EVT_WHEEL" - }, - { - "desc": "鼠标滚轮事件名,在子控件处理之前触发(wheel_event_t)。", - "name": "EVT_WHEEL_BEFORE_CHILDREN" - }, - { - "desc": "取消前一个指针按下事件名(pointer_event_t)。", - "name": "EVT_POINTER_DOWN_ABORT" - }, - { - "desc": "右键/长按弹出上下文菜单的事件名(pointer_event_t)。", - "name": "EVT_CONTEXT_MENU" - }, - { - "desc": "指针进入事件名(pointer_event_t)。", - "name": "EVT_POINTER_ENTER" - }, - { - "desc": "指针离开事件名(pointer_event_t)。", - "name": "EVT_POINTER_LEAVE" - }, - { - "desc": "长按事件名(pointer_event_t)。", - "name": "EVT_LONG_PRESS" - }, - { - "desc": "点击事件名(pointer_event_t)。", - "name": "EVT_CLICK" - }, - { - "desc": "得到焦点事件名(event_t)。", - "name": "EVT_FOCUS" - }, - { - "desc": "失去焦点事件名(event_t)。", - "name": "EVT_BLUR" - }, - { - "desc": "键按下事件名(key_event_t)。", - "name": "EVT_KEY_DOWN" - }, - { - "desc": "键长按事件名(key_event_t)。", - "name": "EVT_KEY_LONG_PRESS" - }, - { - "desc": "键按下事件名,在子控件处理之前触发(key_event_t)。", - "name": "EVT_KEY_DOWN_BEFORE_CHILDREN" - }, - { - "desc": "按键repeat事件名(key_event_t)。", - "name": "EVT_KEY_REPEAT" - }, - { - "desc": "键抬起事件名(key_event_t)。", - "name": "EVT_KEY_UP" - }, - { - "desc": "键抬起事件名,在子控件处理之前触发(key_event_t)。", - "name": "EVT_KEY_UP_BEFORE_CHILDREN" - }, - { - "desc": "即将移动Widget的事件名(event_t)。", - "name": "EVT_WILL_MOVE" - }, - { - "desc": "移动Widget的事件名(event_t)。", - "name": "EVT_MOVE" - }, - { - "desc": "即将调整Widget大小的事件名(event_t)。", - "name": "EVT_WILL_RESIZE" - }, - { - "desc": "调整Widget大小的事件名(event_t)。", - "name": "EVT_RESIZE" - }, - { - "desc": "即将调整Widget大小/位置的事件名(event_t)。", - "name": "EVT_WILL_MOVE_RESIZE" - }, - { - "desc": "调整Widget大小/位置的事件名(event_t)。", - "name": "EVT_MOVE_RESIZE" - }, - { - "desc": "控件的值即将改变的事件名(value_change_event_t)。", - "name": "EVT_VALUE_WILL_CHANGE" - }, - { - "desc": "控件的值改变的事件名(value_change_event_t)。", - "name": "EVT_VALUE_CHANGED" - }, - { - "desc": "控件的值持续改变(如编辑器正在编辑)的事件名(value_change_event_t)。", - "name": "EVT_VALUE_CHANGING" - }, - { - "desc": "绘制的事件名(paint_event_t)。", - "name": "EVT_PAINT" - }, - { - "desc": "即将绘制的事件名(paint_event_t)。", - "name": "EVT_BEFORE_PAINT" - }, - { - "desc": "绘制完成的事件名(paint_event_t)。", - "name": "EVT_AFTER_PAINT" - }, - { - "desc": "绘制完成(canvas状态已经恢复)的事件名(paint_event_t)。", - "name": "EVT_PAINT_DONE" - }, - { - "desc": "locale改变的事件(event_t)。", - "name": "EVT_LOCALE_CHANGED" - }, - { - "desc": "控件动画开始事件(event_t)。", - "name": "EVT_ANIM_START" - }, - { - "desc": "控件动画被主动停止的事件(event_t)。", - "name": "EVT_ANIM_STOP" - }, - { - "desc": "控件动画被暂停的事件(event_t)。", - "name": "EVT_ANIM_PAUSE" - }, - { - "desc": "控件动画yoyo/repeat时,完成一次的事件(event_t)。", - "name": "EVT_ANIM_ONCE" - }, - { - "desc": "控件动画完成事件(event_t)。", - "name": "EVT_ANIM_END" - }, - { - "desc": "窗口加载完成事件(event_t)。", - "name": "EVT_WINDOW_LOAD" - }, - { - "desc": "控件加载完成事件(event_t)。", - "name": "EVT_WIDGET_LOAD" - }, - { - "desc": "窗口即将打开事件(event_t)。\n如果有窗口动画,在窗口动画开始前触发。如果没有窗口动画,在窗口被加载后的下一次循环中触发。", - "name": "EVT_WINDOW_WILL_OPEN" - }, - { - "desc": "窗口打开事件(event_t)。\n如果有窗口动画,在窗口动画完成时触发。如果没有窗口动画,在窗口被加载后的下一次循环中触发。", - "name": "EVT_WINDOW_OPEN" - }, - { - "desc": "窗口被切换到后台事件(event_t)。\n打开新窗口时,当前窗口被切换到后台时,对当前窗口触发本事件。", - "name": "EVT_WINDOW_TO_BACKGROUND" - }, - { - "desc": "窗口被切换到前台事件(event_t)。\n关闭当前窗口时,前一个窗口被切换到前台时,对前一个窗口触发本事件。", - "name": "EVT_WINDOW_TO_FOREGROUND" - }, - { - "desc": "窗口关闭事件。", - "name": "EVT_WINDOW_CLOSE" - }, - { - "desc": "请求关闭窗口的事件(event_t)。", - "name": "EVT_REQUEST_CLOSE_WINDOW" - }, - { - "desc": "顶层窗口改变的事件(window_event_t)。", - "name": "EVT_TOP_WINDOW_CHANGED" - }, - { - "desc": "输入法启动(event_t)。", - "name": "EVT_IM_START" - }, - { - "desc": "输入法停止(event_t)。", - "name": "EVT_IM_STOP" - }, - { - "desc": "输入法提交输入的文本事件(im_commit_event_t)。", - "name": "EVT_IM_COMMIT" - }, - { - "desc": "清除编辑器内容(event_t)。", - "name": "EVT_IM_CLEAR" - }, - { - "desc": "取消编辑,恢复之前的内容(event_t)。", - "name": "EVT_IM_CANCEL" - }, - { - "desc": "进入预编辑状态(event_t)。", - "name": "EVT_IM_PREEDIT" - }, - { - "desc": "确认预编辑内容,退出预编辑状态(event_t)。", - "name": "EVT_IM_PREEDIT_CONFIRM" - }, - { - "desc": "删除预编辑内容,退出预编辑状态event_t)。", - "name": "EVT_IM_PREEDIT_ABORT" - }, - { - "desc": "输入法请求显示候选字事件(im_candidates_event_t)。", - "name": "EVT_IM_SHOW_CANDIDATES" - }, - { - "desc": "输入法请求显示预候选字事件(im_candidates_event_t)。", - "name": "EVT_IM_SHOW_PRE_CANDIDATES" - }, - { - "desc": "输入法语言改变事件(event_t)。", - "name": "EVT_IM_LANG_CHANGED" - }, - { - "desc": "软键盘Action点击事件(event_t)。", - "name": "EVT_IM_ACTION" - }, - { - "desc": "请求更新软键盘上的Action按钮的信息(im_action_button_info_event_t)。", - "name": "EVT_IM_ACTION_INFO" - }, - { - "desc": "开始拖动(event_t)。", - "name": "EVT_DRAG_START" - }, - { - "desc": "拖动(event_t)。", - "name": "EVT_DRAG" - }, - { - "desc": "结束拖动(event_t)。", - "name": "EVT_DRAG_END" - }, - { - "desc": "Reset(event_t)。", - "name": "EVT_RESET" - }, - { - "desc": "在指定的时间内(WITH_SCREEN_SAVER_TIME),没有用户输入事件,由窗口管理器触发。", - "name": "EVT_SCREEN_SAVER" - }, - { - "desc": "内存不足(event_t)。", - "name": "EVT_LOW_MEMORY" - }, - { - "desc": "内存耗尽(event_t)。", - "name": "EVT_OUT_OF_MEMORY" - }, - { - "desc": "屏幕即将旋转(event_t)。", - "name": "EVT_ORIENTATION_WILL_CHANGED" - }, - { - "desc": "屏幕旋转(event_t)。", - "name": "EVT_ORIENTATION_CHANGED" - }, - { - "desc": "控件创建事件(event_t)。", - "name": "EVT_WIDGET_CREATED" - }, - { - "desc": "请求退出应用程序事件。\n点击原生窗口关闭按钮时,通过窗口管理器触发,注册该事件并返回RET_STOP,可以阻止窗口关闭。", - "name": "EVT_REQUEST_QUIT_APP" - }, - { - "desc": "主题变化(event_t)。", - "name": "EVT_THEME_CHANGED" - }, - { - "desc": "控件加载新的子控件(event_t)。", - "name": "EVT_WIDGET_ADD_CHILD" - }, - { - "desc": "控件移除子控件(event_t)。", - "name": "EVT_WIDGET_REMOVE_CHILD" - }, - { - "desc": "scroll view开始滚动(event_t)。", - "name": "EVT_SCROLL_START" - }, - { - "desc": "scroll view滚动(event_t)。", - "name": "EVT_SCROLL" - }, - { - "desc": "scroll view结束滚动(event_t)。", - "name": "EVT_SCROLL_END" - }, - { - "desc": "多点触摸手势(multi_gesture_event_t)。", - "name": "EVT_MULTI_GESTURE" - }, - { - "desc": "页面改变了(event_t)。", - "name": "EVT_PAGE_CHANGED" - }, - { - "desc": "资源管理加载某个资源(assets_event_t)。", - "name": "EVT_ASSET_MANAGER_LOAD_ASSET" - }, - { - "desc": "资源管理卸载某个资源(assets_event_t)。", - "name": "EVT_ASSET_MANAGER_UNLOAD_ASSET" - }, - { - "desc": "资源管理移除同种资源缓存(assets_event_t)。", - "name": "EVT_ASSET_MANAGER_CLEAR_CACHE" - }, - { - "desc": "event queue其它请求编号起始值。", - "name": "EVT_REQ_START" - }, - { - "desc": "用户定义事件起始值。", - "name": "EVT_USER_START" - }, - { - "desc": "无效事件名称。", - "name": "EVT_NONE" - }, - { - "desc": "对象的属性即将改变的事件名(prop_change_event_t)。", - "name": "EVT_PROP_WILL_CHANGE" - }, - { - "desc": "对象的属性改变的事件名(prop_change_event_t)。", - "name": "EVT_PROP_CHANGED" - }, - { - "desc": "对象即将执行命令(cmd_exec_event_t)。", - "name": "EVT_CMD_WILL_EXEC" - }, - { - "desc": "对象完成执行命令(cmd_exec_event_t)。", - "name": "EVT_CMD_EXECED" - }, - { - "desc": "对象命令是否能执行指定的命令(cmd_exec_event_t)。", - "name": "EVT_CMD_CAN_EXEC" - }, - { - "desc": "即将增加和删除集合中的项目(event_t)。", - "name": "EVT_ITEMS_WILL_CHANGE" - }, - { - "desc": "完成增加和删除集合中的项目(event_t)。", - "name": "EVT_ITEMS_CHANGED" - }, - { - "desc": "对象的属性改变的事件名(props_event_t)。", - "name": "EVT_PROPS_CHANGED" - }, - { - "desc": "进度状态(progress_event_t)。", - "name": "EVT_PROGRESS" - }, - { - "desc": "完成(done_event_t)。", - "name": "EVT_DONE" - }, - { - "desc": "错误(error_event_t)。", - "name": "EVT_ERROR" - }, - { - "desc": "对象销毁事件名(event_t)。", - "name": "EVT_DESTROY" - } - ], - "header": "base/events.h", - "name": "event_type_t", - "prefix": "EVT_", - "annotation": { - "scriptable": true - }, - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "font_loader_t*", - "name": "loader", - "desc": "loader对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "字体名字。" - }, - { - "type": "uint8_t*", - "name": "buff", - "desc": "字体数据。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "字体数据长度。" - } - ], - "annotation": {}, - "desc": "加载字体。", - "name": "font_loader_load", - "return": { - "type": "font_t*", - "desc": "成功返回font,失败返回NULL。" - } - } - ], - "events": [], - "properties": [], - "header": "base/font_loader.h", - "desc": "字体加载接口。", - "name": "font_loader_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [], - "annotation": { - "constructor": true - }, - "desc": "获取缺省的字体管理器。", - "name": "font_manager", - "return": { - "type": "font_manager_t*", - "desc": "返回字体管理器对象。" - } - }, - { - "params": [ - { - "type": "font_manager_t*", - "name": "fm", - "desc": "字体管理器对象。" - } - ], - "annotation": {}, - "desc": "设置缺省的字体管理器。", - "name": "font_manager_set", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "font_loader_t*", - "name": "loader", - "desc": "字体加载器。" - } - ], - "annotation": { - "constructor": true - }, - "desc": "创建字体管理器。", - "name": "font_manager_create", - "return": { - "type": "font_manager_t*", - "desc": "返回字体管理器对象。" - } - }, - { - "params": [ - { - "type": "font_manager_t*", - "name": "fm", - "desc": "字体管理器对象。" - }, - { - "type": "font_loader_t*", - "name": "loader", - "desc": "字体加载器。" - } - ], - "annotation": { - "constructor": true - }, - "desc": "初始化字体管理器。", - "name": "font_manager_init", - "return": { - "type": "font_manager_t*", - "desc": "返回字体管理器对象。" - } - }, - { - "params": [ - { - "type": "font_manager_t*", - "name": "imm", - "desc": "字体管理器对象。" - }, - { - "type": "assets_manager_t*", - "name": "assets_manager", - "desc": "资源管理器。" - } - ], - "annotation": {}, - "desc": "设置资源管理器对象\n\n之所以需要设置资源管理器对象,而不是使用缺省的资源管理器对象,是因为在designer中有两个字体管理器:\n\n* 一个用于designer本身加载字体。\n\n* 一个用于被设计的窗口加载字体。\n\n这两个字体管理器需要从不同的路径加载资源。", - "name": "font_manager_set_assets_manager", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "font_manager_t*", - "name": "fm", - "desc": "字体管理器对象。" - }, - { - "type": "char*", - "name": "name", - "desc": "字体名。" - }, - { - "type": "font_t*", - "name": "font", - "desc": "字体。" - } - ], - "annotation": {}, - "desc": "向缓存中加入字体。", - "name": "font_manager_add_font", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "font_manager_t*", - "name": "fm", - "desc": "字体管理器对象。" - }, - { - "type": "char*", - "name": "name", - "desc": "字体名,为NULL时使用缺省字体。" - }, - { - "type": "font_size_t", - "name": "size", - "desc": "字体的大小。" - } - ], - "annotation": {}, - "desc": "从缓存中查找字体,如果没找到,再加载字体,并缓存。", - "name": "font_manager_get_font", - "return": { - "type": "font_t*", - "desc": "返回字体对象。" - } - }, - { - "params": [ - { - "type": "font_manager_t*", - "name": "fm", - "desc": "字体管理器对象。" - }, - { - "type": "char*", - "name": "name", - "desc": "字体名,为NULL时使用缺省字体。" - }, - { - "type": "font_size_t", - "name": "size", - "desc": "字体的大小(矢量字体指定为0即可)。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "卸载指定的字体。", - "name": "font_manager_unload_font", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "font_manager_t*", - "name": "fm", - "desc": "字体管理器对象。" - }, - { - "type": "uint32_t", - "name": "cache_size", - "desc": "每种字体保留缓存字模的个数。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "清除最久没有被使用的缓冲字模。", - "name": "font_manager_shrink_cache", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "font_manager_t*", - "name": "fm", - "desc": "字体管理器对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "卸载全部字体。", - "name": "font_manager_unload_all", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "font_manager_t*", - "name": "fm", - "desc": "字体管理器对象。" - } - ], - "annotation": {}, - "desc": "析构字体管理器。", - "name": "font_manager_deinit", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "font_manager_t*", - "name": "fm", - "desc": "字体管理器对象。" - } - ], - "annotation": {}, - "desc": "析构并释放字体管理器。", - "name": "font_manager_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [ - { - "name": "loader", - "desc": "字体加载器。", - "type": "font_loader_t*", - "annotation": { - "private": true - } - }, - { - "name": "assets_manager", - "desc": "资源管理器。", - "type": "assets_manager_t*", - "annotation": { - "private": true - } - } - ], - "header": "base/font_manager.h", - "desc": "字体管理器,负责字体的加载和缓存管理。\n(如果使用nanovg,字体由nanovg内部管理)", - "name": "font_manager_t", - "annotation": { - "scriptable": true - }, - "level": 1 - }, - { - "type": "enum", - "desc": "字模格式常量定义。", - "consts": [ - { - "desc": "每个像素占用1个字节(缺省)。", - "name": "GLYPH_FMT_ALPHA" - }, - { - "desc": "每个像素占用1个比特。", - "name": "GLYPH_FMT_MONO" - }, - { - "desc": "每个像素占用4个字节。", - "name": "GLYPH_FMT_RGBA" - } - ], - "header": "base/font.h", - "name": "glyph_format_t", - "prefix": "GLYPH_FMT_", - "annotation": { - "scriptable": true - }, - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [], - "annotation": { - "constructor": true - }, - "desc": "创建glyph对象。", - "name": "glyph_create", - "return": { - "type": "glyph_t*", - "desc": "glyph对象。" - } - }, - { - "params": [], - "annotation": { - "constructor": true - }, - "desc": "克隆glyph对象。", - "name": "glyph_clone", - "return": { - "type": "glyph_t*", - "desc": "glyph对象。" - } - }, - { - "params": [ - { - "type": "glyph_t*", - "name": "glyph", - "desc": "glyph对象。" - } - ], - "annotation": { - "deconstructor": true - }, - "desc": "销毁glyph对象。", - "name": "glyph_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [ - { - "name": "x", - "desc": "x坐标。", - "type": "int16_t", - "annotation": { - "readable": true - } - }, - { - "name": "y", - "desc": "y坐标。", - "type": "int16_t", - "annotation": { - "readable": true - } - }, - { - "name": "w", - "desc": "宽度。", - "type": "uint16_t", - "annotation": { - "readable": true - } - }, - { - "name": "h", - "desc": "高度。", - "type": "uint16_t", - "annotation": { - "readable": true - } - }, - { - "name": "advance", - "desc": "占位宽度。", - "type": "uint16_t", - "annotation": { - "readable": true - } - }, - { - "name": "format", - "desc": "格式。", - "type": "uint8_t", - "annotation": { - "readable": true - } - }, - { - "name": "pitch", - "desc": "pitch。", - "type": "uint8_t", - "annotation": { - "readable": true - } - }, - { - "name": "data", - "desc": "数据。", - "type": "const uint8_t*", - "annotation": { - "readable": true - } - } - ], - "header": "base/font.h", - "desc": "代表一个字符的字模。", - "name": "glyph_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "font_t*", - "name": "font", - "desc": "font对象。" - }, - { - "type": "font_size_t", - "name": "font_size", - "desc": "字体大小。" - } - ], - "annotation": {}, - "desc": "获取字体的高度信息。", - "name": "font_get_vmetrics", - "return": { - "type": "font_vmetrics_t", - "desc": "返回字体的高度信息。" - } - }, - { - "params": [ - { - "type": "font_t*", - "name": "font", - "desc": "font对象。" - }, - { - "type": "const char*", - "name": "font_name", - "desc": "字体名称。" - }, - { - "type": "font_size_t", - "name": "font_size", - "desc": "字体大小。" - } - ], - "annotation": {}, - "desc": "检查当前字体是否与指定名称和大小相匹配。", - "name": "font_match", - "return": { - "type": "int32_t", - "desc": "返回TRUE表示成功,FALSE表示失败。" - } - }, - { - "params": [ - { - "type": "font_t*", - "name": "font", - "desc": "font对象。" - }, - { - "type": "wchar_t", - "name": "chr", - "desc": "字符。" - }, - { - "type": "font_size_t", - "name": "font_size", - "desc": "字体大小。" - }, - { - "type": "glyph_t*", - "name": "glyph", - "desc": "返回字模数据。" - } - ], - "annotation": {}, - "desc": "获取指定字符和大小的字模。", - "name": "font_get_glyph", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "font_t*", - "name": "font", - "desc": "font对象。" - }, - { - "type": "uint32_t", - "name": "cache_size", - "desc": "保留缓存字模的个数。" - } - ], - "annotation": {}, - "desc": "清除最近没使用的字模。", - "name": "font_shrink_cache", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "font_t*", - "name": "font", - "desc": "font对象。" - } - ], - "annotation": { - "deconstructor": true - }, - "desc": "销毁font对象。", - "name": "font_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [], - "header": "base/font.h", - "desc": "代表一种字体。", - "name": "font_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "bitmap_t*", - "name": "fb", - "desc": "framebuffer对象。" - }, - { - "type": "const rect_t*", - "name": "dst", - "desc": "要填充的目标区域。" - }, - { - "type": "color_t", - "name": "c", - "desc": "颜色。" - } - ], - "annotation": {}, - "desc": "用颜色填充指定的区域。", - "name": "g2d_fill_rect", - "export": "none", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败,返回失败则上层用软件实现。" - } - }, - { - "params": [ - { - "type": "bitmap_t*", - "name": "fb", - "desc": "framebuffer对象。" - }, - { - "type": "bitmap_t*", - "name": "img", - "desc": "图片对象。" - }, - { - "type": "const rect_t*", - "name": "src", - "desc": "要拷贝的区域。" - }, - { - "type": "xy_t", - "name": "dx", - "desc": "目标位置的x坐标。" - }, - { - "type": "xy_t", - "name": "dy", - "desc": "目标位置的y坐标。" - } - ], - "annotation": {}, - "desc": "把图片指定的区域拷贝到framebuffer中。", - "name": "g2d_copy_image", - "export": "none", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败,返回失败则上层用软件实现。" - } - }, - { - "params": [ - { - "type": "bitmap_t*", - "name": "fb", - "desc": "framebuffer对象。" - }, - { - "type": "bitmap_t*", - "name": "img", - "desc": "图片对象。" - }, - { - "type": "const rect_t*", - "name": "src", - "desc": "要旋转并拷贝的区域。" - }, - { - "type": "lcd_orientation_t", - "name": "o", - "desc": "旋转角度(一般支持90度即可)。" - } - ], - "annotation": {}, - "desc": "把图片指定的区域进行旋转并拷贝到framebuffer相应的区域,本函数主要用于辅助实现横屏和竖屏的切换,一般支持90度旋转即可。", - "name": "g2d_rotate_image", - "export": "none", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败,返回失败则上层用软件实现。" - } - }, - { - "params": [ - { - "type": "bitmap_t*", - "name": "fb", - "desc": "framebuffer对象。" - }, - { - "type": "bitmap_t*", - "name": "img", - "desc": "图片对象。" - }, - { - "type": "const rect_t*", - "name": "dst", - "desc": "目的区域。" - }, - { - "type": "const rect_t*", - "name": "src", - "desc": "源区域。" - }, - { - "type": "uint8_t", - "name": "global_alpha", - "desc": "全局alpha。" - } - ], - "annotation": {}, - "desc": "把图片指定的区域渲染到framebuffer指定的区域,src的大小和dst的大小不一致则进行缩放。\n1.硬件不支持缩放,则返回NOT_IMPL。\n2.硬件不支持全局alpha,global_alpha!=0xff时返回NOT_IMPL。", - "name": "g2d_blend_image", - "export": "none", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败,返回失败则上层用软件实现。" - } - } - ], - "events": [], - "properties": [], - "header": "base/g2d.h", - "desc": "2D加速接口。", - "name": "g2d_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "glyph_cache_t*", - "name": "cache", - "desc": "cache对象。" - }, - { - "type": "uint32_t", - "name": "capacity", - "desc": "最大容量。" - }, - { - "type": "tk_destroy_t", - "name": "destroy_glyph", - "desc": "销毁函数。" - } - ], - "annotation": {}, - "desc": "初始化glyph_cache对象。", - "name": "glyph_cache_init", - "return": { - "type": "glyph_cache_t*", - "desc": "返回cache对象。" - } - }, - { - "params": [ - { - "type": "glyph_cache_t*", - "name": "cache", - "desc": "cache对象。" - }, - { - "type": "wchar_t", - "name": "code", - "desc": "字符。" - }, - { - "type": "font_size_t", - "name": "size", - "desc": "字体大小。" - }, - { - "type": "glyph_t", - "name": "g", - "desc": "glyph对象。" - } - ], - "annotation": {}, - "desc": "增加一个glyph对象到cache。", - "name": "glyph_cache_add", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "glyph_cache_t*", - "name": "cache", - "desc": "cache对象。" - }, - { - "type": "wchar_t", - "name": "code", - "desc": "字符。" - }, - { - "type": "font_size_t", - "name": "size", - "desc": "字体大小。" - }, - { - "type": "glyph_t", - "name": "g", - "desc": "glyph对象(用于返回glyph)。" - } - ], - "annotation": {}, - "desc": "查找glyph对象。", - "name": "glyph_cache_lookup", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "glyph_cache_t*", - "name": "cache", - "desc": "cache对象。" - }, - { - "type": "uint32_t", - "name": "cache_size", - "desc": "保留cache个数。" - } - ], - "annotation": {}, - "desc": "释放部分glyph。", - "name": "glyph_cache_shrink", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "glyph_cache_t*", - "name": "cache", - "desc": "cache对象。" - } - ], - "annotation": {}, - "desc": "释放全部cache。", - "name": "glyph_cache_deinit", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [], - "header": "base/glyph_cache.h", - "desc": "glyph cache", - "name": "glyph_cache_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "bitmap_t*", - "name": "bitmap", - "desc": "位图对象。" - } - ], - "annotation": {}, - "desc": "为位图创建缓冲区。", - "name": "graphic_buffer_create_for_bitmap", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "const uint8_t*", - "name": "data", - "desc": "数据。" - }, - { - "type": "uint32_t", - "name": "w", - "desc": "宽度。" - }, - { - "type": "uint32_t", - "name": "h", - "desc": "宽度。" - }, - { - "type": "bitmap_format_t", - "name": "format", - "desc": "格式。" - } - ], - "annotation": {}, - "desc": "创建缓冲区。\n\n> 为了兼容raw图像。", - "name": "graphic_buffer_create_with_data", - "return": { - "type": "graphic_buffer_t*", - "desc": "返回缓存区。" - } - }, - { - "params": [ - { - "type": "graphic_buffer_t*", - "name": "buffer", - "desc": "图像缓冲区对象。" - } - ], - "annotation": {}, - "desc": "为读取数据而锁定缓冲区。", - "name": "graphic_buffer_lock_for_read", - "return": { - "type": "uint8_t*", - "desc": "返回缓存区的首地址。" - } - }, - { - "params": [ - { - "type": "graphic_buffer_t*", - "name": "buffer", - "desc": "图像缓冲区对象。" - } - ], - "annotation": {}, - "desc": "为修改数据而锁定缓冲区。", - "name": "graphic_buffer_lock_for_write", - "return": { - "type": "uint8_t*", - "desc": "返回缓存区的首地址。" - } - }, - { - "params": [ - { - "type": "graphic_buffer_t*", - "name": "buffer", - "desc": "图像缓冲区对象。" - } - ], - "annotation": {}, - "desc": "解锁缓冲区。", - "name": "graphic_buffer_unlock", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "graphic_buffer_t*", - "name": "buffer", - "desc": "图像缓冲区对象。" - }, - { - "type": "void*", - "name": "data", - "desc": "内存数据。" - }, - { - "type": "uint32_t", - "name": "w", - "desc": "宽度。" - }, - { - "type": "uint32_t", - "name": "h", - "desc": "宽度。" - } - ], - "annotation": {}, - "desc": "附件到指定的内存。", - "name": "graphic_buffer_attach", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "graphic_buffer_t*", - "name": "buffer", - "desc": "图像缓冲区对象。" - }, - { - "type": "bitmap_t*", - "name": "bitmap", - "desc": "位图对象。" - } - ], - "annotation": {}, - "desc": "用于检查graphic buffer的有效性。", - "name": "graphic_buffer_is_valid_for", - "return": { - "type": "bool_t", - "desc": "返回TRUE表示有效,否则表示无效。" - } - }, - { - "params": [ - { - "type": "graphic_buffer_t*", - "name": "buffer", - "desc": "图像缓冲区对象。" - } - ], - "annotation": {}, - "desc": "销毁缓冲区。", - "name": "graphic_buffer_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [], - "header": "base/graphic_buffer.h", - "desc": "graphic_buffer。", - "name": "graphic_buffer_t", - "level": 1 - }, - { - "type": "class", - "methods": [], - "events": [], - "properties": [], - "header": "base/hscrollable.h", - "desc": "帮助实现控件左右滚动的效果。", - "name": "hscrollable_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "idle_func_t", - "name": "on_idle", - "desc": "idle回调函数,回调函数返回RET_REPEAT,则下次继续执行,否则自动移出。" - }, - { - "type": "void*", - "name": "ctx", - "desc": "idle回调函数的上下文。" - } - ], - "annotation": { - "scriptable": "custom", - "static": true - }, - "desc": "增加一个idle。", - "name": "idle_add", - "return": { - "type": "uint32_t", - "desc": "返回idle的ID,0表示失败。" - } - }, - { - "params": [ - { - "type": "idle_func_t", - "name": "on_idle", - "desc": "idle回调函数。" - }, - { - "type": "void*", - "name": "ctx", - "desc": "idle回调函数的上下文。" - } - ], - "annotation": { - "static": true - }, - "desc": "用于非GUI线程增加一个idle,本函数向主循环的事件队列中发送一个增加idle的请求。", - "name": "idle_queue", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "uint32_t", - "name": "idle_id", - "desc": "idleID。" - } - ], - "annotation": { - "scriptable": true, - "static": true - }, - "desc": "删除指定的idle。", - "name": "idle_remove", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "uint32_t", - "name": "idle_id", - "desc": "idleID。" - }, - { - "type": "tk_destroy_t", - "name": "on_destroy", - "desc": "回调函数。" - }, - { - "type": "void*", - "name": "on_destroy_ctx", - "desc": "回调函数上下文。" - } - ], - "annotation": {}, - "desc": "设置一个回调函数,在idle被销毁时调用(方便脚本语言去释放回调函数)。", - "name": "idle_set_on_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [], - "annotation": {}, - "desc": "调用全部idle的函数。", - "name": "idle_dispatch", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [], - "annotation": { - "static": true - }, - "desc": "返回idle的个数。", - "name": "idle_count", - "return": { - "type": "uint32_t", - "desc": "返回idle的个数。" - } - } - ], - "events": [], - "properties": [], - "header": "base/idle.h", - "desc": "idle可以看作是duration为0的定时器。\n\n> idle可以用来实现一些异步处理。\n\n示例:\n\n```c\nstatic ret_t something_on_idle(const idle_info_t* info) {\nwidget_t* widget = WIDGET(info->ctx);\nedit_t* edit = EDIT(widget);\n...\nreturn RET_REMOVE;\n}\n\n...\n\nidle_add(something_on_idle, edit);\n\n```\n\n> 在非GUI线程请用idle\\_queue。", - "name": "idle_t", - "annotation": { - "scriptable": true, - "fake": true - }, - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "image_loader_t*", - "name": "loader", - "desc": "loader对象。" - }, - { - "type": "const asset_info_t*", - "name": "asset", - "desc": "资源。" - }, - { - "type": "bitmap_t*", - "name": "bitmap", - "desc": "用于返回位图对象。" - } - ], - "annotation": {}, - "desc": "加载图片。", - "name": "image_loader_load", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "image_loader_t*", - "name": "loader", - "desc": "loader对象。" - } - ], - "annotation": { - "static": true - }, - "desc": "注册图片加载器。", - "name": "image_loader_register", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "image_loader_t*", - "name": "loader", - "desc": "loader对象。" - } - ], - "annotation": { - "static": true - }, - "desc": "注销图片加载器。", - "name": "image_loader_unregister", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "const asset_info_t*", - "name": "asset", - "desc": "资源。" - }, - { - "type": "bitmap_t*", - "name": "bitmap", - "desc": "用于返回位图对象。" - } - ], - "annotation": { - "static": true - }, - "desc": "查找满足条件加载器并加载图片。", - "name": "image_loader_load_image", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [], - "header": "base/image_loader.h", - "desc": "图片加载接口。", - "name": "image_loader_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [], - "annotation": { - "constructor": true, - "scriptable": true - }, - "desc": "获取缺省的图片管理器。", - "name": "image_manager", - "alias": "image_manager_instance", - "return": { - "type": "image_manager_t*", - "desc": "返回图片管理器对象。" - } - }, - { - "params": [ - { - "type": "image_manager_t*", - "name": "imm", - "desc": "图片管理器对象。" - } - ], - "annotation": {}, - "desc": "设置缺省的图片管理器。", - "name": "image_manager_set", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [], - "annotation": { - "constructor": true - }, - "desc": "创建图片管理器。", - "name": "image_manager_create", - "return": { - "type": "image_manager_t*", - "desc": "返回图片管理器对象。" - } - }, - { - "params": [ - { - "type": "image_manager_t*", - "name": "imm", - "desc": "图片管理器对象。" - } - ], - "annotation": { - "constructor": true - }, - "desc": "初始化图片管理器。", - "name": "image_manager_init", - "return": { - "type": "image_manager_t*", - "desc": "返回图片管理器对象。" - } - }, - { - "params": [ - { - "type": "image_manager_t*", - "name": "imm", - "desc": "图片管理器对象。" - }, - { - "type": "char*", - "name": "name", - "desc": "图片名称。" - }, - { - "type": "bitmap_t*", - "name": "image", - "desc": "用于返回图片。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取指定的图片。\n先从缓存查找,如果没找到,再加载并缓存。", - "name": "image_manager_get_bitmap", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "image_manager_t*", - "name": "imm", - "desc": "图片管理器对象。" - }, - { - "type": "char*", - "name": "name", - "desc": "图片名称。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "预加载指定的图片。", - "name": "image_manager_preload", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "image_manager_t*", - "name": "imm", - "desc": "图片管理器对象。" - }, - { - "type": "uint32_t", - "name": "time_delta_s", - "desc": "时间范围,单位为秒。" - } - ], - "annotation": {}, - "desc": "从图片管理器中卸载指定时间内没有使用的图片。", - "name": "image_manager_unload_unused", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "image_manager_t*", - "name": "imm", - "desc": "图片管理器对象。" - } - ], - "annotation": {}, - "desc": "从图片管理器中卸载全部图片。", - "name": "image_manager_unload_all", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "image_manager_t*", - "name": "imm", - "desc": "图片管理器对象。" - }, - { - "type": "bitmap_t*", - "name": "image", - "desc": "图片。" - } - ], - "annotation": {}, - "desc": "从图片管理器中卸载指定的图片。", - "name": "image_manager_unload_bitmap", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "image_manager_t*", - "name": "imm", - "desc": "图片管理器对象。" - }, - { - "type": "bitmap_t*", - "name": "image", - "desc": "返回图片信息。" - } - ], - "annotation": {}, - "desc": "更新缓存中图片的specific信息。", - "name": "image_manager_update_specific", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "image_manager_t*", - "name": "imm", - "desc": "图片管理器对象。" - }, - { - "type": "assets_manager_t*", - "name": "assets_manager", - "desc": "资源管理器。" - } - ], - "annotation": {}, - "desc": "设置资源管理器对象。\n\n之所以需要设置资源管理器对象,而不是使用缺省的资源管理器对象,是因为在designer中有两个图片管理器:\n\n* 一个用于designer本身加载图片。\n\n* 一个用于被设计的窗口加载图片。\n\n这两个图片管理器需要从不同的路径加载资源。", - "name": "image_manager_set_assets_manager", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "image_manager_t*", - "name": "imm", - "desc": "图片管理器对象。" - } - ], - "annotation": {}, - "desc": "析构图片管理器。", - "name": "image_manager_deinit", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "image_manager_t*", - "name": "imm", - "desc": "图片管理器对象。" - } - ], - "annotation": {}, - "desc": "析构并释放图片管理器。", - "name": "image_manager_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [ - { - "name": "images", - "desc": "缓存的图片。", - "type": "darray_t", - "annotation": { - "private": true - } - }, - { - "name": "assets_manager", - "desc": "资源管理器。", - "type": "assets_manager_t*", - "annotation": { - "private": true - } - } - ], - "header": "base/image_manager.h", - "desc": "图片管理器。负责加载,解码和缓存图片。", - "name": "image_manager_t", - "annotation": { - "scriptable": true - }, - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "input_device_status_t*", - "name": "ids", - "desc": "输入设备状态管理器对象。" - } - ], - "annotation": { - "constructor": true - }, - "desc": "初始化输入设备状态管理器。", - "name": "input_device_status_init", - "return": { - "type": "input_device_status_t*", - "desc": "返回输入设备状态管理器对象。" - } - }, - { - "params": [ - { - "type": "input_device_status_t*", - "name": "ids", - "desc": "输入设备状态管理器对象。" - }, - { - "type": "widget_t*", - "name": "widget", - "desc": "窗口管理器对象。" - }, - { - "type": "event_t*", - "name": "e", - "desc": "事件对象。" - } - ], - "annotation": {}, - "desc": "对输入事件进行处理,然后分发给widget。", - "name": "input_device_status_on_input_event", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "input_device_status_t*", - "name": "ids", - "desc": "输入设备状态管理器对象。" - } - ], - "annotation": {}, - "desc": "取消全部已经按下的键。\n\n窗口切换时,旧窗口按下的键,一直不松开,会持续触发PRESS,可能会干扰新窗口的用户功能。\n所在窗口切换时,abort全部已经按下的键,直到按键松开。", - "name": "input_device_status_abort_all_pressed_keys", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [], - "header": "base/input_device_status.h", - "desc": "输入设备状态管理器。本类仅供窗口管理器内部使用。", - "name": "input_device_status_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "input_method_t*", - "name": "im", - "desc": "输入法对象。" - } - ], - "annotation": { - "constructor": true - }, - "desc": "创建输入法引擎对象。", - "name": "input_engine_create", - "return": { - "type": "input_engine_t*", - "desc": "返回输入法引擎对象。" - } - }, - { - "params": [ - { - "type": "input_engine_t*", - "name": "engine", - "desc": "输入法引擎对象。" - } - ], - "annotation": { - "deconstructor": true - }, - "desc": "销毁输入法引擎对象。", - "name": "input_engine_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "input_engine_t*", - "name": "engine", - "desc": "输入法引擎对象。" - } - ], - "annotation": {}, - "desc": "清除所有输入的按键组合和候选字。", - "name": "input_engine_reset_input", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "input_engine_t*", - "name": "engine", - "desc": "输入法引擎对象。" - }, - { - "type": "int", - "name": "key", - "desc": "键值。" - } - ], - "annotation": {}, - "desc": "输入新的按键,并更新候选字。", - "name": "input_engine_input", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "input_engine_t*", - "name": "engine", - "desc": "输入法引擎对象。" - }, - { - "type": "const char*", - "name": "keys", - "desc": "按键组合。" - } - ], - "annotation": {}, - "desc": "根据按键组合,更新候选字,并通过输入法对象提交候选字和pre候选字。", - "name": "input_engine_search", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [ - { - "name": "keys", - "desc": "当前的按键组合。", - "type": "str_t", - "annotation": { - "private": true - } - }, - { - "name": "candidates", - "desc": "当前按键组合对应的候选字列表。", - "type": "char*", - "annotation": { - "private": true - } - }, - { - "name": "candidates_nr", - "desc": "当前按键组合对应的候选字/词个数。", - "type": "uint32_t", - "annotation": { - "private": true - } - } - ], - "header": "base/input_engine.h", - "desc": "输入法引擎接口。\n\n常见的实现方式有以下几种:\n\n* 空实现。用于不需要输入法的嵌入式平台。\n\n* 拼音输入法实现。用于需要输入法的嵌入式平台。\n\n```graphviz\n[default_style]\n\ninput_engine_pinyin_t -> input_engine_t[arrowhead=empty style=dashed]\ninput_engine_null_t -> input_engine_t[arrowhead=empty style=dashed]\n\n```", - "name": "input_engine_t", - "level": 1 - }, - { - "type": "enum", - "desc": "输入类型常量定义。", - "consts": [ - { - "desc": "文本。字符串属性值:text", - "name": "INPUT_TEXT" - }, - { - "desc": "整数。字符串属性值:int", - "name": "INPUT_INT" - }, - { - "desc": "非负整数。字符串属性值:uint", - "name": "INPUT_UINT" - }, - { - "desc": "16进制整数。字符串属性值:hex", - "name": "INPUT_HEX" - }, - { - "desc": "浮点数。字符串属性值:float", - "name": "INPUT_FLOAT" - }, - { - "desc": "非负浮点数。字符串属性值:ufloat", - "name": "INPUT_UFLOAT" - }, - { - "desc": "邮件地址。字符串属性值:email", - "name": "INPUT_EMAIL" - }, - { - "desc": "密码。字符串属性值:password", - "name": "INPUT_PASSWORD" - }, - { - "desc": "电话号码。字符串属性值:phone", - "name": "INPUT_PHONE" - }, - { - "desc": "IP Addr V4(如:192.168.1.1)。字符串属性值:ipv4", - "name": "INPUT_IPV4" - }, - { - "desc": "日期(如:2020/02/20)。字符串属性值:date", - "name": "INPUT_DATE" - }, - { - "desc": "时间(时分,如:12:00)。字符串属性值:time", - "name": "INPUT_TIME" - }, - { - "desc": "时间(时分秒,如:12:00:00)。字符串属性值:time_full", - "name": "INPUT_TIME_FULL" - }, - { - "desc": "使用自定义的软键盘(如计算器等应用不希望弹出系统软键盘)。字符串属性值:custom", - "name": "INPUT_CUSTOM" - }, - { - "desc": "使用自定义的密码软键盘。字符串属性值:custom_password", - "name": "INPUT_CUSTOM_PASSWORD" - } - ], - "header": "base/input_method.h", - "name": "input_type_t", - "prefix": "INPUT_", - "annotation": { - "scriptable": true - }, - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "input_method_t*", - "name": "im", - "desc": "控件对象。" - }, - { - "type": "event_t*", - "name": "e", - "desc": "事件。" - } - ], - "annotation": {}, - "desc": "分发一个事件。", - "name": "input_method_dispatch", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "input_method_t*", - "name": "im", - "desc": "控件对象。" - }, - { - "type": "event_t*", - "name": "e", - "desc": "事件。" - } - ], - "annotation": {}, - "desc": "分发一个事件当前焦点控件。", - "name": "input_method_dispatch_to_widget", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "input_method_t*", - "name": "im", - "desc": "输入法对象。" - }, - { - "type": "event_type_t", - "name": "type", - "desc": "事件类型。" - }, - { - "type": "event_func_t", - "name": "on_event", - "desc": "事件处理函数。" - }, - { - "type": "void*", - "name": "ctx", - "desc": "事件处理函数上下文。" - } - ], - "annotation": {}, - "desc": "注册指定事件的处理函数。", - "name": "input_method_on", - "return": { - "type": "uint32_t", - "desc": "返回id,用于input_method_off。" - } - }, - { - "params": [ - { - "type": "input_method_t*", - "name": "im", - "desc": "输入法对象。" - }, - { - "type": "uint32_t", - "name": "id", - "desc": "input_method_on返回的ID。" - } - ], - "annotation": {}, - "desc": "注销指定事件的处理函数。", - "name": "input_method_off", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "input_method_t*", - "name": "im", - "desc": "输入法对象。" - }, - { - "type": "widget_t*", - "name": "widget", - "desc": "焦点控件,为NULL时关闭输入法,非NULL时打开输入法。" - } - ], - "annotation": {}, - "desc": "打开或关闭输入法。", - "name": "input_method_request", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "input_method_t*", - "name": "im", - "desc": "输入法对象。" - }, - { - "type": "char*", - "name": "text", - "desc": "按钮的文本。" - }, - { - "type": "bool_t", - "name": "enable", - "desc": "按钮的是否可用。" - } - ], - "annotation": {}, - "desc": "设置软键盘上的action按钮的信息。", - "name": "input_method_update_action_button_info", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "input_method_t*", - "name": "im", - "desc": "输入法对象。" - } - ], - "annotation": {}, - "desc": "软键盘上的action按钮被点击时,调用本函数分发EVT_IM_ACTION事件。", - "name": "input_method_dispatch_action", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "input_method_t*", - "name": "im", - "desc": "输入法对象。" - }, - { - "type": "const char*", - "name": "text", - "desc": "文本。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "提交输入文本。", - "name": "input_method_commit_text", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "input_method_t*", - "name": "im", - "desc": "输入法对象。" - }, - { - "type": "const char*", - "name": "lang", - "desc": "语言。格式为语言+国家/地区码。如:zh_cn和en_us等。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置语言。\n\n> 有时在同一种语言环境下,也需要输入多种文字,典型的情况是同时输入中文和英文。\n> 比如T9输入法,可以同时支持中文和英文输入,配合软键盘随时切换输入的语言。\n> 数字、小写字母、大写字母和符合也可以视为输入的语言。\n> 主要用于提示输入法引擎选择适当的输入方法。", - "name": "input_method_set_lang", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "input_method_t*", - "name": "im", - "desc": "输入法对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取语言。", - "name": "input_method_get_lang", - "return": { - "type": "const char*", - "desc": "返回语言。" - } - }, - { - "params": [ - { - "type": "input_method_t*", - "name": "im", - "desc": "输入法对象。" - }, - { - "type": "bool_t", - "name": "replace", - "desc": "是否替换原来的文本。" - }, - { - "type": "const char*", - "name": "text", - "desc": "文本。" - } - ], - "annotation": {}, - "desc": "提交输入文本。", - "name": "input_method_commit_text_ex", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "input_method_t*", - "name": "im", - "desc": "输入法对象。" - }, - { - "type": "uint32_t", - "name": "key", - "desc": "键值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "提交按键。", - "name": "input_method_dispatch_key", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "input_method_t*", - "name": "im", - "desc": "输入法对象。" - }, - { - "type": "const char*", - "name": "key", - "desc": "键值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "提交按键。", - "name": "input_method_dispatch_keys", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "input_method_t*", - "name": "im", - "desc": "输入法对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "分发进入预编辑状态的事件。", - "name": "input_method_dispatch_preedit", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "input_method_t*", - "name": "im", - "desc": "输入法对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "分发确认预编辑状态的事件(提交预编辑内容,退出预编辑状态)。", - "name": "input_method_dispatch_preedit_confirm", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "input_method_t*", - "name": "im", - "desc": "输入法对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "分发取消预编辑状态的事件(提交预编辑内容,退出预编辑状态)。", - "name": "input_method_dispatch_preedit_abort", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "input_method_t*", - "name": "im", - "desc": "输入法对象。" - }, - { - "type": "char*", - "name": "strs", - "desc": "候选字列表。" - }, - { - "type": "uint32_t", - "name": "nr", - "desc": "候选字个数。" - }, - { - "type": "int32_t", - "name": "selected", - "desc": "缺省选中候选字的序数。" - } - ], - "annotation": {}, - "desc": "请求显示候选字。", - "name": "input_method_dispatch_candidates", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "input_method_t*", - "name": "im", - "desc": "输入法对象。" - }, - { - "type": "char*", - "name": "strs", - "desc": "候选字列表。" - }, - { - "type": "uint32_t", - "name": "nr", - "desc": "候选字个数。" - }, - { - "type": "int32_t", - "name": "selected", - "desc": "缺省选中候选字的序数。" - } - ], - "annotation": {}, - "desc": "请求显示预候选字。\n\n> 预候选字: 在有的输入法中,比如T9硬键盘输入时,按下12两个键时,预候选字会显示可用的拼音列表。\n> 从预候选字列表中选择拼音,再查询拼音对应的候选字列表。", - "name": "input_method_dispatch_pre_candidates", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [], - "annotation": {}, - "desc": "创建输入法对象。在具体实现中实现。", - "name": "input_method_create", - "return": { - "type": "input_method_t*", - "desc": "成功返回输入法对象,失败返回NULL。" - } - }, - { - "params": [ - { - "type": "input_method_t*", - "name": "im", - "desc": "输入法对象。" - } - ], - "annotation": {}, - "desc": "销毁输入法对象。在具体实现中实现。", - "name": "input_method_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [], - "annotation": { - "constructor": true, - "scriptable": true - }, - "desc": "获取全局输入法对象。", - "name": "input_method", - "alias": "input_method_instance", - "return": { - "type": "input_method_t*", - "desc": "成功返回输入法对象,失败返回NULL。" - } - }, - { - "params": [ - { - "type": "input_method_t*", - "name": "im", - "desc": "输入法对象。" - } - ], - "annotation": {}, - "desc": "设置全局输入法对象。", - "name": "input_method_set", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [ - { - "name": "widget", - "desc": "当前的焦点控件。", - "type": "widget_t*", - "annotation": { - "private": true - } - }, - { - "name": "keyboard", - "desc": "当前的软件键盘。", - "type": "widget_t*", - "annotation": { - "private": true - } - }, - { - "name": "win", - "desc": "当前的窗口。", - "type": "widget_t*", - "annotation": { - "private": true - } - }, - { - "name": "win_delta_y", - "desc": "由于软键盘的弹出,可能会将窗口向上推移,win_delta_y为推移的距离。", - "type": "int32_t", - "annotation": { - "private": true - } - }, - { - "name": "win_old_y", - "desc": "窗口原来的位置。", - "type": "int32_t", - "annotation": { - "private": true - } - }, - { - "name": "action_button_enable", - "desc": "软键盘的上的action按钮是否可用。", - "type": "bool_t", - "annotation": { - "readable": true - } - }, - { - "name": "action_button_enable", - "desc": "软键盘的上的action按钮文本。", - "type": "bool_t", - "annotation": { - "readable": true - } - }, - { - "name": "emitter", - "desc": "emitter。用于实现dispatch/on/off等功能。", - "type": "emitter_t", - "annotation": { - "private": true - } - }, - { - "name": "keyboard_name", - "desc": "软键盘资源名称。", - "type": "char*", - "annotation": { - "readable": true - } - } - ], - "header": "base/input_method.h", - "desc": "输入法接口。\n\n常见的实现方式有以下几种:\n\n* 空实现。用于不需要输入法的嵌入式平台。\n\n* 缺省实现。用于需要输入法的嵌入式平台。\n\n* 基于SDL实现的平台原生输入法。用于桌面系统和手机系统。\n\n```graphviz\n[default_style]\n\ninput_method_default_t -> input_method_t [arrowhead=empty style=dashed]\ninput_method_sdl_t -> input_method_t [arrowhead=empty style=dashed]\ninput_method_null_t -> input_method_t [arrowhead=empty style=dashed]\n\n```\n\n> 输入类型请参考:[input\\_type](input_type_t.md)", - "name": "input_method_t", - "annotation": { - "scriptable": true - }, - "level": 1 - }, - { - "type": "enum", - "desc": "key code。", - "consts": [ - { - "desc": "TK_KEY_RETURN", - "name": "TK_KEY_RETURN" - }, - { - "desc": "TK_KEY_ESCAPE", - "name": "TK_KEY_ESCAPE" - }, - { - "desc": "TK_KEY_BACKSPACE", - "name": "TK_KEY_BACKSPACE" - }, - { - "desc": "TK_KEY_TAB", - "name": "TK_KEY_TAB" - }, - { - "desc": "TK_KEY_SPACE", - "name": "TK_KEY_SPACE" - }, - { - "desc": "TK_KEY_EXCLAIM", - "name": "TK_KEY_EXCLAIM" - }, - { - "desc": "TK_KEY_QUOTEDBL", - "name": "TK_KEY_QUOTEDBL" - }, - { - "desc": "TK_KEY_HASH", - "name": "TK_KEY_HASH" - }, - { - "desc": "TK_KEY_PERCENT", - "name": "TK_KEY_PERCENT" - }, - { - "desc": "TK_KEY_DOLLAR", - "name": "TK_KEY_DOLLAR" - }, - { - "desc": "TK_KEY_AMPERSAND", - "name": "TK_KEY_AMPERSAND" - }, - { - "desc": "TK_KEY_QUOTE", - "name": "TK_KEY_QUOTE" - }, - { - "desc": "TK_KEY_LEFTPAREN", - "name": "TK_KEY_LEFTPAREN" - }, - { - "desc": "TK_KEY_RIGHTPAREN", - "name": "TK_KEY_RIGHTPAREN" - }, - { - "desc": "TK_KEY_ASTERISK", - "name": "TK_KEY_ASTERISK" - }, - { - "desc": "TK_KEY_PLUS", - "name": "TK_KEY_PLUS" - }, - { - "desc": "TK_KEY_COMMA", - "name": "TK_KEY_COMMA" - }, - { - "desc": "TK_KEY_MINUS", - "name": "TK_KEY_MINUS" - }, - { - "desc": "TK_KEY_PERIOD", - "name": "TK_KEY_PERIOD" - }, - { - "desc": "TK_KEY_SLASH", - "name": "TK_KEY_SLASH" - }, - { - "desc": "TK_KEY_0", - "name": "TK_KEY_0" - }, - { - "desc": "TK_KEY_1", - "name": "TK_KEY_1" - }, - { - "desc": "TK_KEY_2", - "name": "TK_KEY_2" - }, - { - "desc": "TK_KEY_3", - "name": "TK_KEY_3" - }, - { - "desc": "TK_KEY_4", - "name": "TK_KEY_4" - }, - { - "desc": "TK_KEY_5", - "name": "TK_KEY_5" - }, - { - "desc": "TK_KEY_6", - "name": "TK_KEY_6" - }, - { - "desc": "TK_KEY_7", - "name": "TK_KEY_7" - }, - { - "desc": "TK_KEY_8", - "name": "TK_KEY_8" - }, - { - "desc": "TK_KEY_9", - "name": "TK_KEY_9" - }, - { - "desc": "TK_KEY_COLON", - "name": "TK_KEY_COLON" - }, - { - "desc": "TK_KEY_SEMICOLON", - "name": "TK_KEY_SEMICOLON" - }, - { - "desc": "TK_KEY_LESS", - "name": "TK_KEY_LESS" - }, - { - "desc": "TK_KEY_EQUAL", - "name": "TK_KEY_EQUAL" - }, - { - "desc": "TK_KEY_GREATER", - "name": "TK_KEY_GREATER" - }, - { - "desc": "TK_KEY_QUESTION", - "name": "TK_KEY_QUESTION" - }, - { - "desc": "TK_KEY_AT", - "name": "TK_KEY_AT" - }, - { - "desc": "TK_KEY_LEFTBRACKET", - "name": "TK_KEY_LEFTBRACKET" - }, - { - "desc": "TK_KEY_BACKSLASH", - "name": "TK_KEY_BACKSLASH" - }, - { - "desc": "TK_KEY_RIGHTBRACKET", - "name": "TK_KEY_RIGHTBRACKET" - }, - { - "desc": "TK_KEY_CARET", - "name": "TK_KEY_CARET" - }, - { - "desc": "TK_KEY_UNDERSCORE", - "name": "TK_KEY_UNDERSCORE" - }, - { - "desc": "TK_KEY_BACKQUOTE", - "name": "TK_KEY_BACKQUOTE" - }, - { - "desc": "TK_KEY_a", - "name": "TK_KEY_a" - }, - { - "desc": "TK_KEY_b", - "name": "TK_KEY_b" - }, - { - "desc": "TK_KEY_c", - "name": "TK_KEY_c" - }, - { - "desc": "TK_KEY_d", - "name": "TK_KEY_d" - }, - { - "desc": "TK_KEY_e", - "name": "TK_KEY_e" - }, - { - "desc": "TK_KEY_f", - "name": "TK_KEY_f" - }, - { - "desc": "TK_KEY_g", - "name": "TK_KEY_g" - }, - { - "desc": "TK_KEY_h", - "name": "TK_KEY_h" - }, - { - "desc": "TK_KEY_i", - "name": "TK_KEY_i" - }, - { - "desc": "TK_KEY_j", - "name": "TK_KEY_j" - }, - { - "desc": "TK_KEY_k", - "name": "TK_KEY_k" - }, - { - "desc": "TK_KEY_l", - "name": "TK_KEY_l" - }, - { - "desc": "TK_KEY_m", - "name": "TK_KEY_m" - }, - { - "desc": "TK_KEY_n", - "name": "TK_KEY_n" - }, - { - "desc": "TK_KEY_o", - "name": "TK_KEY_o" - }, - { - "desc": "TK_KEY_p", - "name": "TK_KEY_p" - }, - { - "desc": "TK_KEY_q", - "name": "TK_KEY_q" - }, - { - "desc": "TK_KEY_r", - "name": "TK_KEY_r" - }, - { - "desc": "TK_KEY_s", - "name": "TK_KEY_s" - }, - { - "desc": "TK_KEY_t", - "name": "TK_KEY_t" - }, - { - "desc": "TK_KEY_u", - "name": "TK_KEY_u" - }, - { - "desc": "TK_KEY_v", - "name": "TK_KEY_v" - }, - { - "desc": "TK_KEY_w", - "name": "TK_KEY_w" - }, - { - "desc": "TK_KEY_x", - "name": "TK_KEY_x" - }, - { - "desc": "TK_KEY_y", - "name": "TK_KEY_y" - }, - { - "desc": "TK_KEY_z", - "name": "TK_KEY_z" - }, - { - "desc": "TK_KEY_A", - "name": "TK_KEY_A" - }, - { - "desc": "TK_KEY_B", - "name": "TK_KEY_B" - }, - { - "desc": "TK_KEY_C", - "name": "TK_KEY_C" - }, - { - "desc": "TK_KEY_D", - "name": "TK_KEY_D" - }, - { - "desc": "TK_KEY_E", - "name": "TK_KEY_E" - }, - { - "desc": "TK_KEY_F", - "name": "TK_KEY_F" - }, - { - "desc": "TK_KEY_G", - "name": "TK_KEY_G" - }, - { - "desc": "TK_KEY_H", - "name": "TK_KEY_H" - }, - { - "desc": "TK_KEY_I", - "name": "TK_KEY_I" - }, - { - "desc": "TK_KEY_J", - "name": "TK_KEY_J" - }, - { - "desc": "TK_KEY_K", - "name": "TK_KEY_K" - }, - { - "desc": "TK_KEY_L", - "name": "TK_KEY_L" - }, - { - "desc": "TK_KEY_M", - "name": "TK_KEY_M" - }, - { - "desc": "TK_KEY_N", - "name": "TK_KEY_N" - }, - { - "desc": "TK_KEY_O", - "name": "TK_KEY_O" - }, - { - "desc": "TK_KEY_P", - "name": "TK_KEY_P" - }, - { - "desc": "TK_KEY_Q", - "name": "TK_KEY_Q" - }, - { - "desc": "TK_KEY_R", - "name": "TK_KEY_R" - }, - { - "desc": "TK_KEY_S", - "name": "TK_KEY_S" - }, - { - "desc": "TK_KEY_T", - "name": "TK_KEY_T" - }, - { - "desc": "TK_KEY_U", - "name": "TK_KEY_U" - }, - { - "desc": "TK_KEY_V", - "name": "TK_KEY_V" - }, - { - "desc": "TK_KEY_W", - "name": "TK_KEY_W" - }, - { - "desc": "TK_KEY_X", - "name": "TK_KEY_X" - }, - { - "desc": "TK_KEY_Y", - "name": "TK_KEY_Y" - }, - { - "desc": "TK_KEY_Z", - "name": "TK_KEY_Z" - }, - { - "desc": "TK_KEY_DOT", - "name": "TK_KEY_DOT" - }, - { - "desc": "TK_KEY_DELETE", - "name": "TK_KEY_DELETE" - }, - { - "desc": "TK_KEY_LEFTBRACE", - "name": "TK_KEY_LEFTBRACE" - }, - { - "desc": "TK_KEY_RIGHTBRACE", - "name": "TK_KEY_RIGHTBRACE" - }, - { - "desc": "TK_KEY_LSHIFT", - "name": "TK_KEY_LSHIFT" - }, - { - "desc": "TK_KEY_RSHIFT", - "name": "TK_KEY_RSHIFT" - }, - { - "desc": "TK_KEY_LCTRL", - "name": "TK_KEY_LCTRL" - }, - { - "desc": "TK_KEY_RCTRL", - "name": "TK_KEY_RCTRL" - }, - { - "desc": "TK_KEY_LALT", - "name": "TK_KEY_LALT" - }, - { - "desc": "TK_KEY_RALT", - "name": "TK_KEY_RALT" - }, - { - "desc": "TK_KEY_CAPSLOCK", - "name": "TK_KEY_CAPSLOCK" - }, - { - "desc": "TK_KEY_HOME", - "name": "TK_KEY_HOME" - }, - { - "desc": "TK_KEY_END", - "name": "TK_KEY_END" - }, - { - "desc": "TK_KEY_INSERT", - "name": "TK_KEY_INSERT" - }, - { - "desc": "TK_KEY_UP", - "name": "TK_KEY_UP" - }, - { - "desc": "TK_KEY_DOWN", - "name": "TK_KEY_DOWN" - }, - { - "desc": "TK_KEY_LEFT", - "name": "TK_KEY_LEFT" - }, - { - "desc": "TK_KEY_RIGHT", - "name": "TK_KEY_RIGHT" - }, - { - "desc": "TK_KEY_PAGEUP", - "name": "TK_KEY_PAGEUP" - }, - { - "desc": "TK_KEY_PAGEDOWN", - "name": "TK_KEY_PAGEDOWN" - }, - { - "desc": "TK_KEY_F1", - "name": "TK_KEY_F1" - }, - { - "desc": "TK_KEY_F2", - "name": "TK_KEY_F2" - }, - { - "desc": "TK_KEY_F3", - "name": "TK_KEY_F3" - }, - { - "desc": "TK_KEY_F4", - "name": "TK_KEY_F4" - }, - { - "desc": "TK_KEY_F5", - "name": "TK_KEY_F5" - }, - { - "desc": "TK_KEY_F6", - "name": "TK_KEY_F6" - }, - { - "desc": "TK_KEY_F7", - "name": "TK_KEY_F7" - }, - { - "desc": "TK_KEY_F8", - "name": "TK_KEY_F8" - }, - { - "desc": "TK_KEY_F9", - "name": "TK_KEY_F9" - }, - { - "desc": "TK_KEY_F10", - "name": "TK_KEY_F10" - }, - { - "desc": "TK_KEY_F11", - "name": "TK_KEY_F11" - }, - { - "desc": "TK_KEY_F12", - "name": "TK_KEY_F12" - }, - { - "desc": "TK_KEY_MENU", - "name": "TK_KEY_MENU" - }, - { - "desc": "TK_KEY_COMMAND", - "name": "TK_KEY_COMMAND" - }, - { - "desc": "TK_KEY_BACK", - "name": "TK_KEY_BACK" - }, - { - "desc": "TK_KEY_CANCEL", - "name": "TK_KEY_CANCEL" - } - ], - "header": "base/keys.h", - "name": "key_code_t", - "prefix": "TK_", - "annotation": { - "scriptable": true - }, - "level": 1 - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件。" - } - ], - "annotation": { - "global": true - }, - "desc": "调用widget的selflayout。", - "name": "widget_layout_self", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - }, - "type": "method", - "header": "base/layout.h", - "level": 1 - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件。" - } - ], - "annotation": { - "global": true - }, - "desc": "调用widget默认的childrenlayout。", - "name": "widget_layout_children_default", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - }, - "type": "method", - "header": "base/layout.h", - "level": 1 - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件。" - } - ], - "annotation": { - "global": true - }, - "desc": "对floating属性的子控件进行layout。", - "name": "widget_layout_floating_children", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - }, - "type": "method", - "header": "base/layout.h", - "level": 1 - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件。" - }, - { - "type": "darray_t*", - "name": "result", - "desc": "返回队列。" - }, - { - "type": "bool_t", - "name": "keep_disable", - "desc": "是否保留非enable状态的控件。" - }, - { - "type": "bool_t", - "name": "keep_invisible", - "desc": "是否保留非visible状态的控件。" - } - ], - "annotation": { - "global": true - }, - "desc": "获取受childrenlayout控件的子控件队列。", - "name": "widget_get_children_for_layout", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - }, - "type": "method", - "header": "base/layout.h", - "level": 1 - }, - { - "type": "enum", - "desc": "LCD绘制模式常量定义。", - "consts": [ - { - "desc": "正常绘制。", - "name": "LCD_DRAW_NORMAL" - }, - { - "desc": "绘制窗口动画,两个窗口无重叠。\n在该模式下,可以直接绘制到显存,不用绘制到framebuffer中。", - "name": "LCD_DRAW_ANIMATION" - }, - { - "desc": "绘制窗口动画,两个窗口有重叠。\n(目前无特殊用途)。", - "name": "LCD_DRAW_ANIMATION_OVERLAP" - }, - { - "desc": "如果lcd支持swap操作,在特殊情况下,可以使用该模式提速。", - "name": "LCD_DRAW_SWAP" - }, - { - "desc": "离线模式绘制(仅适用于framebuffer)。\n在该模式下,绘制的内容不会显示出来,但可以用take_snapshot取出来,主要用于窗口动画。", - "name": "LCD_DRAW_OFFLINE" - } - ], - "header": "base/lcd.h", - "name": "lcd_draw_mode_t", - "prefix": "LCD_DRAW_", - "level": 1 - }, - { - "type": "enum", - "desc": "LCD类型常量定义。", - "consts": [ - { - "desc": "基于FrameBuffer的LCD。", - "name": "LCD_FRAMEBUFFER" - }, - { - "desc": "基于寄存器的LCD。", - "name": "LCD_REGISTER" - }, - { - "desc": "基于VGCANVS的LCD。仅在支持OpenGL时,用nanovg实现。", - "name": "LCD_VGCANVAS" - }, - { - "desc": "单色LCD。", - "name": "LCD_MONO" - } - ], - "header": "base/lcd.h", - "name": "lcd_type_t", - "prefix": "LCD_", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "lcd_t*", - "name": "lcd", - "desc": "lcd对象。" - }, - { - "type": "const rect_t*", - "name": "dirty_rect", - "desc": "需要绘制的区域。" - }, - { - "type": "lcd_draw_mode_t", - "name": "anim_mode", - "desc": "动画模式,如果可能,直接画到显存而不是离线的framebuffer。" - } - ], - "annotation": {}, - "desc": "准备绘制。", - "name": "lcd_begin_frame", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "lcd_t*", - "name": "lcd", - "desc": "lcd对象。" - }, - { - "type": "const rect_t*", - "name": "rect", - "desc": "裁剪区域。" - } - ], - "annotation": {}, - "desc": "设置裁剪区域。", - "name": "lcd_set_clip_rect", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "lcd_t*", - "name": "lcd", - "desc": "lcd对象。" - }, - { - "type": "rect_t*", - "name": "rect", - "desc": "裁剪区域。" - } - ], - "annotation": {}, - "desc": "获取裁剪区域。", - "name": "lcd_get_clip_rect", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "lcd_t*", - "name": "lcd", - "desc": "lcd对象。" - }, - { - "type": "wh_t", - "name": "w", - "desc": "新的宽度。" - }, - { - "type": "wh_t", - "name": "h", - "desc": "新的高度。" - }, - { - "type": "uint32_t", - "name": "line_length", - "desc": "line_length。" - } - ], - "annotation": {}, - "desc": "基于SDL的PC软件,在SDL窗口resize时,需要调用本函数resize lcd。\n屏幕旋转时会调用本函数,调整LCD的大小。", - "name": "lcd_resize", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "lcd_t*", - "name": "lcd", - "desc": "lcd对象。" - }, - { - "type": "uint8_t", - "name": "alpha", - "desc": "全局alpha。" - } - ], - "annotation": {}, - "desc": "设置全局alpha。", - "name": "lcd_set_global_alpha", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "lcd_t*", - "name": "lcd", - "desc": "lcd对象。" - }, - { - "type": "color_t", - "name": "color", - "desc": "颜色。" - } - ], - "annotation": {}, - "desc": "设置文本颜色。", - "name": "lcd_set_text_color", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "lcd_t*", - "name": "lcd", - "desc": "lcd对象。" - }, - { - "type": "color_t", - "name": "color", - "desc": "颜色。" - } - ], - "annotation": {}, - "desc": "设置线条颜色。", - "name": "lcd_set_stroke_color", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "lcd_t*", - "name": "lcd", - "desc": "lcd对象。" - }, - { - "type": "color_t", - "name": "color", - "desc": "颜色。" - } - ], - "annotation": {}, - "desc": "设置填充颜色。", - "name": "lcd_set_fill_color", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "lcd_t*", - "name": "lcd", - "desc": "lcd对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "字体名称。" - } - ], - "annotation": {}, - "desc": "设置字体名称。", - "name": "lcd_set_font_name", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "lcd_t*", - "name": "lcd", - "desc": "lcd对象。" - }, - { - "type": "uint32_t", - "name": "font_size", - "desc": "字体大小。" - } - ], - "annotation": {}, - "desc": "设置字体大小。", - "name": "lcd_set_font_size", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "lcd_t*", - "name": "lcd", - "desc": "lcd对象。" - }, - { - "type": "xy_t", - "name": "x", - "desc": "x坐标。" - }, - { - "type": "xy_t", - "name": "y", - "desc": "y坐标。" - }, - { - "type": "xy_t", - "name": "h", - "desc": "直线高度。" - } - ], - "annotation": {}, - "desc": "绘制一条垂直线。", - "name": "lcd_draw_vline", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "lcd_t*", - "name": "lcd", - "desc": "lcd对象。" - }, - { - "type": "xy_t", - "name": "x", - "desc": "x坐标。" - }, - { - "type": "xy_t", - "name": "y", - "desc": "y坐标。" - }, - { - "type": "xy_t", - "name": "w", - "desc": "直线宽度。" - } - ], - "annotation": {}, - "desc": "绘制一条水平线。", - "name": "lcd_draw_hline", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "lcd_t*", - "name": "lcd", - "desc": "lcd对象。" - }, - { - "type": "point_t*", - "name": "points", - "desc": "要绘制的点集合。" - }, - { - "type": "uint32_t", - "name": "nr", - "desc": "点的个数。" - } - ], - "annotation": {}, - "desc": "绘制一组点。", - "name": "lcd_draw_points", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "lcd_t*", - "name": "lcd", - "desc": "lcd对象。" - }, - { - "type": "xy_t", - "name": "x", - "desc": "x坐标。" - }, - { - "type": "xy_t", - "name": "y", - "desc": "y坐标。" - } - ], - "annotation": {}, - "desc": "获取指定点的颜色,对于基于非FrameBuffer的LCD,返回当前的fill_color。", - "name": "lcd_get_point_color", - "return": { - "type": "color_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "lcd_t*", - "name": "lcd", - "desc": "lcd对象。" - }, - { - "type": "xy_t", - "name": "x", - "desc": "x坐标。" - }, - { - "type": "xy_t", - "name": "y", - "desc": "y坐标。" - }, - { - "type": "wh_t", - "name": "w", - "desc": "宽度。" - }, - { - "type": "wh_t", - "name": "h", - "desc": "高度。" - } - ], - "annotation": {}, - "desc": "绘制实心矩形。", - "name": "lcd_fill_rect", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "lcd_t*", - "name": "lcd", - "desc": "lcd对象。" - }, - { - "type": "xy_t", - "name": "x", - "desc": "x坐标。" - }, - { - "type": "xy_t", - "name": "y", - "desc": "y坐标。" - }, - { - "type": "wh_t", - "name": "w", - "desc": "宽度。" - }, - { - "type": "wh_t", - "name": "h", - "desc": "高度。" - } - ], - "annotation": {}, - "desc": "填充实心矩形。", - "name": "lcd_clear_rect", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "lcd_t*", - "name": "lcd", - "desc": "lcd对象。" - }, - { - "type": "xy_t", - "name": "x", - "desc": "x坐标。" - }, - { - "type": "xy_t", - "name": "y", - "desc": "y坐标。" - }, - { - "type": "wh_t", - "name": "w", - "desc": "宽度。" - }, - { - "type": "wh_t", - "name": "h", - "desc": "高度。" - } - ], - "annotation": {}, - "desc": "绘制矩形边框。", - "name": "lcd_stroke_rect", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "lcd_t*", - "name": "lcd", - "desc": "lcd对象。" - }, - { - "type": "glyph_t*", - "name": "glyph", - "desc": "字模" - }, - { - "type": "const rect_t*", - "name": "src", - "desc": "只绘制指定区域的部分。" - }, - { - "type": "xy_t", - "name": "x", - "desc": "x坐标。" - }, - { - "type": "xy_t", - "name": "y", - "desc": "y坐标。" - } - ], - "annotation": {}, - "desc": "绘制字符。如果实现了measure_text/draw_text则不需要实现本函数。", - "name": "lcd_draw_glyph", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "lcd_t*", - "name": "lcd", - "desc": "lcd对象。" - }, - { - "type": "const wchar_t*", - "name": "str", - "desc": "字符串。" - }, - { - "type": "uint32_t", - "name": "nr", - "desc": "字符数。" - } - ], - "annotation": {}, - "desc": "测量字符串占用的宽度。", - "name": "lcd_measure_text", - "return": { - "type": "float_t", - "desc": "返回字符串占用的宽度。" - } - }, - { - "params": [ - { - "type": "lcd_t*", - "name": "lcd", - "desc": "lcd对象。" - }, - { - "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": "lcd_draw_text", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "lcd_t*", - "name": "lcd", - "desc": "lcd对象。" - }, - { - "type": "bitmap_t*", - "name": "img", - "desc": "图片。" - }, - { - "type": "const rect_t*", - "name": "src", - "desc": "只绘制指定区域的部分。" - }, - { - "type": "const rect_t*", - "name": "dst", - "desc": "绘制到目标区域。" - } - ], - "annotation": {}, - "desc": "绘制图片。", - "name": "lcd_draw_image", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "lcd_t*", - "name": "lcd", - "desc": "lcd对象。" - }, - { - "type": "draw_image_info_t*", - "name": "info", - "desc": "绘制参数。" - } - ], - "annotation": {}, - "desc": "绘制图片。", - "name": "lcd_draw_image_matrix", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "lcd_t*", - "name": "lcd", - "desc": "lcd对象。" - } - ], - "annotation": {}, - "desc": "获取矢量图canvas。", - "name": "lcd_get_vgcanvas", - "return": { - "type": "vgcanvas_t*", - "desc": "返回矢量图canvas。" - } - }, - { - "params": [ - { - "type": "lcd_t*", - "name": "lcd", - "desc": "lcd对象。" - }, - { - "type": "bitmap_t*", - "name": "img", - "desc": "返回快照图片。" - }, - { - "type": "bool_t", - "name": "auto_rotate", - "desc": "是否根据LCD实际方向自动旋转。" - } - ], - "annotation": {}, - "desc": "拍摄快照,一般用于窗口动画,只有framebuffer模式,才支持。", - "name": "lcd_take_snapshot", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "lcd_t*", - "name": "lcd", - "desc": "lcd对象。" - } - ], - "annotation": {}, - "desc": "获取期望的位图格式。绘制期望的位图格式可以提高绘制性能。", - "name": "lcd_get_desired_bitmap_format", - "return": { - "type": "bitmap_format_t", - "desc": "返回期望的位图格式。" - } - }, - { - "params": [ - { - "type": "lcd_t*", - "name": "lcd", - "desc": "lcd对象。" - } - ], - "annotation": {}, - "desc": "获取宽度。", - "name": "lcd_get_width", - "return": { - "type": "wh_t", - "desc": "返回宽度。" - } - }, - { - "params": [ - { - "type": "lcd_t*", - "name": "lcd", - "desc": "lcd对象。" - } - ], - "annotation": {}, - "desc": "获取高度。", - "name": "lcd_get_height", - "return": { - "type": "wh_t", - "desc": "返回高度。" - } - }, - { - "params": [ - { - "type": "lcd_t*", - "name": "lcd", - "desc": "lcd对象。" - } - ], - "annotation": {}, - "desc": "判读lcd是否支持swap。", - "name": "lcd_is_swappable", - "return": { - "type": "bool_t", - "desc": "返回是否支持swap。" - } - }, - { - "params": [ - { - "type": "lcd_t*", - "name": "lcd", - "desc": "lcd对象。" - } - ], - "annotation": {}, - "desc": "完成绘制,同步到显示设备。", - "name": "lcd_end_frame", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "lcd_t*", - "name": "lcd", - "desc": "lcd对象。" - }, - { - "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": "lcd_get_text_metrics", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "lcd_t*", - "name": "lcd", - "desc": "lcd对象。" - } - ], - "annotation": {}, - "desc": "销毁lcd对象。", - "name": "lcd_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [ - { - "name": "w", - "desc": "屏幕的宽度", - "type": "wh_t", - "annotation": { - "readable": true - } - }, - { - "name": "height", - "desc": "屏幕的高度", - "type": "wh_t", - "annotation": { - "readable": true - } - }, - { - "name": "global_alpha", - "desc": "全局alpha", - "type": "uint8_t", - "annotation": { - "readable": true - } - }, - { - "name": "text_color", - "desc": "文本颜色", - "type": "color_t", - "annotation": { - "readable": true - } - }, - { - "name": "fill_color", - "desc": "填充颜色", - "type": "color_t", - "annotation": { - "readable": true - } - }, - { - "name": "stroke_color", - "desc": "线条颜色", - "type": "color_t", - "annotation": { - "readable": true - } - }, - { - "name": "font_name", - "desc": "字体名称。", - "type": "char*", - "annotation": { - "readable": true - } - }, - { - "name": "font_size", - "desc": "字体大小。", - "type": "uint32_t", - "annotation": { - "readable": true - } - }, - { - "name": "draw_mode", - "desc": "绘制模式。", - "type": "lcd_draw_mode_t", - "annotation": { - "readable": true - } - }, - { - "name": "type", - "desc": "LCD的类型。", - "type": "lcd_type_t", - "annotation": { - "readable": true - } - }, - { - "name": "ratio", - "desc": "屏幕密度。", - "type": "float_t", - "annotation": { - "readable": true - } - }, - { - "name": "support_dirty_rect", - "desc": "是否支持脏矩形。", - "type": "bool_t", - "annotation": { - "readable": true - } - }, - { - "name": "last_update_time", - "desc": "last update time", - "type": "uint64_t", - "annotation": { - "readable": true - } - } - ], - "header": "base/lcd.h", - "desc": "显示设备抽象基类。", - "name": "lcd_t", - "level": 1 - }, - { - "type": "enum", - "desc": "换行类型。", - "consts": [ - { - "desc": "必须换行。", - "name": "LINE_BREAK_MUST" - }, - { - "desc": "可以换行。", - "name": "LINE_BREAK_ALLOW" - }, - { - "desc": "不可以换行。", - "name": "LINE_BREAK_NO" - } - ], - "header": "base/line_break.h", - "name": "line_break_type_t", - "prefix": "LINE_BREAK_", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "wchar_t", - "name": "c1", - "desc": "前面的字符。" - }, - { - "type": "wchar_t", - "name": "c2", - "desc": "后面的字符。" - } - ], - "annotation": {}, - "desc": "检查两个字符之间是否允许换行。", - "name": "line_break_check", - "return": { - "type": "line_break_type_t", - "desc": "返回类型。" - } - }, - { - "params": [ - { - "type": "wchar_t", - "name": "c1", - "desc": "前面的字符。" - }, - { - "type": "wchar_t", - "name": "c2", - "desc": "后面的字符。" - } - ], - "annotation": {}, - "desc": "检查两个字符之间是否允许单词分割。", - "name": "word_break_check", - "return": { - "type": "line_break_type_t", - "desc": "返回类型。" - } - }, - { - "params": [ - { - "type": "const wchar_t*", - "name": "str", - "desc": "字符串。" - } - ], - "annotation": {}, - "desc": "统计行数。", - "name": "line_break_count", - "return": { - "type": "uint32_t", - "desc": "返回行数。" - } - }, - { - "params": [ - { - "type": "const wchar_t*", - "name": "str", - "desc": "字符串。" - }, - { - "type": "line_break_on_line_t", - "name": "on_line", - "desc": "回调函数。" - }, - { - "type": "void*", - "name": "ctx", - "desc": "回调函数的上下文。" - } - ], - "annotation": {}, - "desc": "解析字符串,对于每一行调用on_line函数。", - "name": "line_break", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [], - "header": "base/line_break.h", - "desc": "换行相关函数。", - "name": "line_break_check", - "annotation": { - "fake": true - }, - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [], - "annotation": { - "constructor": true, - "scriptable": true - }, - "desc": "获取缺省locale_info。", - "name": "locale_info", - "alias": "locale_info_instance", - "return": { - "type": "locale_info_t*", - "desc": "返回locale_info对象。" - } - }, - { - "params": [ - { - "type": "locale_info_t*", - "name": "locale_info", - "desc": "locale_info对象。" - } - ], - "annotation": {}, - "desc": "设置缺省locale_info。", - "name": "locale_info_set", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "char*", - "name": "language", - "desc": "语言。" - }, - { - "type": "char*", - "name": "country", - "desc": "国家或地区。" - } - ], - "annotation": { - "constructor": true - }, - "desc": "创建locale_info。", - "name": "locale_info_create", - "return": { - "type": "locale_info_t*", - "desc": "返回locale_info对象。" - } - }, - { - "params": [ - { - "type": "locale_info_t*", - "name": "locale_info", - "desc": "locale_info对象。" - }, - { - "type": "const char*", - "name": "text", - "desc": "待翻译的文本。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "翻译字符串。", - "name": "locale_info_tr", - "return": { - "type": "const char*", - "desc": "返回翻译之后的字符串。" - } - }, - { - "params": [ - { - "type": "locale_info_t*", - "name": "locale_info", - "desc": "locale_info对象。" - }, - { - "type": "char*", - "name": "language", - "desc": "语言。" - }, - { - "type": "char*", - "name": "country", - "desc": "国家或地区。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置当前的国家和语言。", - "name": "locale_info_change", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "locale_info_t*", - "name": "locale_info", - "desc": "locale_info对象。" - }, - { - "type": "event_type_t", - "name": "type", - "desc": "事件类型,目前固定为EVT_LOCALE_CHANGED。" - }, - { - "type": "event_func_t", - "name": "on_event", - "desc": "事件处理函数。" - }, - { - "type": "void*", - "name": "ctx", - "desc": "事件处理函数上下文。" - } - ], - "annotation": {}, - "desc": "注册指定事件的处理函数。", - "name": "locale_info_on", - "return": { - "type": "uint32_t", - "desc": "返回id,用于locale_info_off。" - } - }, - { - "params": [ - { - "type": "locale_info_t*", - "name": "locale_info", - "desc": "locale_info对象。" - }, - { - "type": "uint32_t", - "name": "id", - "desc": "locale_info_on返回的ID。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "注销指定事件的处理函数。", - "name": "locale_info_off", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "locale_info_t*", - "name": "locale_info", - "desc": "locale_info对象。" - }, - { - "type": "assets_manager_t*", - "name": "assets_manager", - "desc": "资源管理器。" - } - ], - "annotation": {}, - "desc": "设置资源管理器对象。", - "name": "locale_info_set_assets_manager", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "locale_info_t*", - "name": "locale_info", - "desc": "locale_info对象。" - } - ], - "annotation": {}, - "desc": "重新加载字符串资源。", - "name": "locale_info_reload", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "locale_info_t*", - "name": "locale_info", - "desc": "locale_info对象。" - } - ], - "annotation": {}, - "desc": "释放全部资源并销毁locale_info对象。", - "name": "locale_info_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [ - { - "name": "country;", - "desc": "国家或地区。如:CN", - "type": "char*", - "annotation": { - "readable": true - } - }, - { - "name": "language", - "desc": "语言。如:zh", - "type": "char*", - "annotation": { - "readable": true - } - }, - { - "name": "assets_manager", - "desc": "资源管理器。", - "type": "assets_manager_t*", - "annotation": { - "private": true - } - } - ], - "header": "base/locale_info.h", - "desc": "本地化信息。提供字符串翻译数据管理,当前语言改变的事件通知等等。", - "name": "locale_info_t", - "annotation": { - "scriptable": true - }, - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [], - "annotation": { - "static": true - }, - "desc": "获取当前main_loop对象", - "name": "main_loop", - "return": { - "type": "main_loop_t*", - "desc": "返回main_loop对象。" - } - }, - { - "params": [ - { - "type": "main_loop_t*", - "name": "l", - "desc": "main_loop对象。" - }, - { - "type": "event_source_t*", - "name": "source", - "desc": "event_source对象。" - } - ], - "annotation": {}, - "desc": "添加event_source。", - "name": "main_loop_add_event_source", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "main_loop_t*", - "name": "l", - "desc": "main_loop对象。" - }, - { - "type": "event_source_t*", - "name": "source", - "desc": "event_source对象。" - } - ], - "annotation": {}, - "desc": "删除event_source。", - "name": "main_loop_remove_event_source", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "main_loop_t*", - "name": "l", - "desc": "main_loop对象。" - }, - { - "type": "void*", - "name": "tag", - "desc": "tag。" - } - ], - "annotation": {}, - "desc": "删除event_source。", - "name": "main_loop_remove_event_source_by_tag", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [], - "header": "base/main_loop.h", - "desc": "主循环接口。", - "name": "main_loop_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [], - "annotation": { - "constructor": true - }, - "desc": "获取缺省的控件自身布局算法工厂对象。", - "name": "self_layouter_factory", - "return": { - "type": "self_layouter_factory_t*", - "desc": "返回控件自身布局算法工厂对象。" - } - }, - { - "params": [ - { - "type": "self_layouter_factory_t*", - "name": "factory", - "desc": "控件自身布局算法工厂对象。" - } - ], - "annotation": {}, - "desc": "设置缺省的控件自身布局算法工厂对象。", - "name": "self_layouter_factory_set", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [], - "annotation": { - "constructor": true - }, - "desc": "创建控件自身布局算法工厂对象。", - "name": "self_layouter_factory_create", - "return": { - "type": "self_layouter_factory_t*", - "desc": "返回控件自身布局算法工厂对象。" - } - }, - { - "params": [ - { - "type": "self_layouter_factory_t*", - "name": "factory", - "desc": "layouter工厂对象。" - }, - { - "type": "const char*", - "name": "type", - "desc": "控件自身布局算法类型。" - }, - { - "type": "self_layouter_create_t", - "name": "create", - "desc": "控件自身布局算法创建函数。" - } - ], - "annotation": {}, - "desc": "注册控件自身布局算法创建函数。", - "name": "self_layouter_factory_register", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "self_layouter_factory_t*", - "name": "factory", - "desc": "控件自身布局算法工厂对象。" - }, - { - "type": "const char*", - "name": "type", - "desc": "类型。" - } - ], - "annotation": { - "constructor": true - }, - "desc": "创建指定类型的控件自身布局算法对象。", - "name": "self_layouter_factory_create_layouter", - "return": { - "type": "self_layouter_t*", - "desc": "返回控件自身布局算法对象。" - } - }, - { - "params": [ - { - "type": "self_layouter_factory_t*", - "name": "factory", - "desc": "控件自身布局算法工厂对象。" - } - ], - "annotation": {}, - "desc": "析构并释放控件自身布局算法工厂对象。", - "name": "self_layouter_factory_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [], - "header": "base/self_layouter_factory.h", - "desc": "控件自身布局算法工厂。", - "name": "self_layouter_factory_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "self_layouter_t*", - "name": "layouter", - "desc": "layouter对象。" - } - ], - "annotation": {}, - "desc": "获取全部参数。", - "name": "self_layouter_to_string", - "return": { - "type": "ret_t", - "desc": "返回字符串格式的参数。" - } - }, - { - "params": [ - { - "type": "self_layouter_t*", - "name": "layouter", - "desc": "layouter对象。" - }, - { - "type": "widget_t*", - "name": "widget", - "desc": "控件。" - }, - { - "type": "rect_t*", - "name": "area", - "desc": "可以使用的区域。" - } - ], - "annotation": {}, - "desc": "对控件自身进行布局。", - "name": "self_layouter_layout", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "self_layouter_t*", - "name": "layouter", - "desc": "layouter对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "参数名。" - }, - { - "type": "value_t*", - "name": "v", - "desc": "返回参数的值。" - } - ], - "annotation": {}, - "desc": "获取指定的参数。", - "name": "self_layouter_get_param", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "self_layouter_t*", - "name": "layouter", - "desc": "layouter对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "参数名。" - }, - { - "type": "const value_t*", - "name": "v", - "desc": "参数的值。" - } - ], - "annotation": {}, - "desc": "获取指定的参数。", - "name": "self_layouter_set_param", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "self_layouter_t*", - "name": "layouter", - "desc": "layouter对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "参数名。" - }, - { - "type": "const char*", - "name": "value", - "desc": "参数值。" - } - ], - "annotation": {}, - "desc": "设置字符串格式的参数。", - "name": "self_layouter_set_param_str", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "self_layouter_t*", - "name": "layouter", - "desc": "layouter对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "参数名。" - }, - { - "type": "float_t", - "name": "defval", - "desc": "缺省值。" - } - ], - "annotation": {}, - "desc": "获取指定的浮点格式的参数。", - "name": "self_layouter_get_param_float", - "return": { - "type": "ret_t", - "desc": "成功返回参数的值,失败返回缺省值。" - } - }, - { - "params": [ - { - "type": "self_layouter_t*", - "name": "layouter", - "desc": "layouter对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "参数名。" - }, - { - "type": "int32_t", - "name": "defval", - "desc": "缺省值。" - } - ], - "annotation": {}, - "desc": "获取指定的整数格式的参数。", - "name": "self_layouter_get_param_int", - "return": { - "type": "ret_t", - "desc": "成功返回参数的值,失败返回缺省值。" - } - }, - { - "params": [ - { - "type": "self_layouter_t*", - "name": "layouter", - "desc": "layouter对象。" - } - ], - "annotation": {}, - "desc": "销毁layouter对象。", - "name": "self_layouter_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "const char*", - "name": "params", - "desc": "参数。" - } - ], - "annotation": {}, - "desc": "创建layouter对象。", - "name": "self_layouter_create", - "return": { - "type": "self_layouter_t*", - "desc": "返回layouter对象。" - } - }, - { - "params": [ - { - "type": "const char*", - "name": "layouter", - "desc": "被克隆的对象。" - } - ], - "annotation": {}, - "desc": "克隆layouter对象。", - "name": "self_layouter_clone", - "return": { - "type": "self_layouter_t*", - "desc": "返回layouter对象。" - } - } - ], - "events": [], - "properties": [], - "header": "base/self_layouter.h", - "desc": "控件自身排版布局器的接口。\n\n按特定算法对控件进行排版布局,子类需要实现vtable中的函数。", - "name": "self_layouter_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [], - "annotation": { - "constructor": true - }, - "desc": "初始化快捷键对象。", - "name": "shortcut_init", - "return": { - "type": "shortcut_t*", - "desc": "返回快捷键对象。" - } - }, - { - "params": [ - { - "type": "shortcut_t*", - "name": "shortcut", - "desc": "快捷键对象。" - } - ], - "annotation": { - "constructor": true - }, - "desc": "初始化快捷键对象。", - "name": "shortcut_init_with_str", - "return": { - "type": "shortcut_t*", - "desc": "返回快捷键对象。" - } - }, - { - "params": [ - { - "type": "shortcut_t*", - "name": "shortcut1", - "desc": "快捷键对象1。" - }, - { - "type": "shortcut_t*", - "name": "shortcut2", - "desc": "快捷键对象2。" - } - ], - "annotation": {}, - "desc": "比较两个快捷键对象。", - "name": "shortcut_equal", - "return": { - "type": "bool_t", - "desc": "返回TRUE表示相同,否则表示不同。" - } - }, - { - "params": [ - { - "type": "shortcut_t*", - "name": "filter", - "desc": "过滤器快捷键对象。" - }, - { - "type": "shortcut_t*", - "name": "event", - "desc": "事件快捷键对象。" - } - ], - "annotation": {}, - "desc": "检查事件与快捷键是否匹配。", - "name": "shortcut_match", - "return": { - "type": "bool_t", - "desc": "返回TRUE表示匹配,否则表示不匹配。" - } - } - ], - "events": [], - "properties": [ - { - "name": "is_valid", - "desc": "是否有效。", - "type": "bool_t", - "annotation": { - "readable": true - } - }, - { - "name": "key", - "desc": "键值。", - "type": "uint32_t", - "annotation": { - "readable": true - } - }, - { - "name": "alt", - "desc": "alt键是否按下。", - "type": "bool_t", - "annotation": { - "readable": true - } - }, - { - "name": "lalt", - "desc": "left alt键是否按下。", - "type": "bool_t", - "annotation": { - "readable": true - } - }, - { - "name": "ralt", - "desc": "right alt键是否按下。", - "type": "bool_t", - "annotation": { - "readable": true - } - }, - { - "name": "ctrl", - "desc": "ctrl键是否按下。", - "type": "bool_t", - "annotation": { - "readable": true - } - }, - { - "name": "lctrl", - "desc": "left ctrl键是否按下。", - "type": "bool_t", - "annotation": { - "readable": true - } - }, - { - "name": "rctrl", - "desc": "right ctrl键是否按下。", - "type": "bool_t", - "annotation": { - "readable": true - } - }, - { - "name": "shift", - "desc": "shift键是否按下。", - "type": "bool_t", - "annotation": { - "readable": true - } - }, - { - "name": "lshift", - "desc": "left shift键是否按下。", - "type": "bool_t", - "annotation": { - "readable": true - } - }, - { - "name": "rshift", - "desc": "right shift键是否按下。", - "type": "bool_t", - "annotation": { - "readable": true - } - }, - { - "name": "cmd", - "desc": "cmd/win键是否按下。", - "type": "bool_t", - "annotation": { - "readable": true - } - }, - { - "name": "menu", - "desc": "menu键是否按下。", - "type": "bool_t", - "annotation": { - "readable": true - } - } - ], - "header": "base/shortcut.h", - "desc": "快捷键。", - "name": "shortcut_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "style_factory_t*", - "name": "factory", - "desc": "factory对象。" - }, - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - } - ], - "annotation": {}, - "desc": "创建style。", - "name": "style_factory_create_style", - "return": { - "type": "style_t*", - "desc": "返回style对象。" - } - }, - { - "params": [], - "annotation": { - "constructor": true - }, - "desc": "获取缺省的style factory。", - "name": "style_factory", - "alias": "style_factory_instance", - "return": { - "type": "style_factory_t*", - "desc": "返回style factory对象。" - } - }, - { - "params": [ - { - "type": "style_factory_t*", - "name": "factory", - "desc": "factory对象。" - } - ], - "annotation": {}, - "desc": "设置缺省的style factory(需要自定义的style factory才设置)。", - "name": "style_factory_set", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [], - "header": "base/style_factory.h", - "desc": "style工厂接口,主要用于创建style。\n\n> 在特殊情况下,可以实现自己的style工厂,比如支持CSS和可实时修改的style。", - "name": "style_factory_t", - "level": 1 - }, - { - "type": "enum", - "desc": "style常量定义。", - "consts": [ - { - "desc": "背景颜色。", - "name": "STYLE_ID_BG_COLOR" - }, - { - "desc": "前景颜色。", - "name": "STYLE_ID_FG_COLOR" - }, - { - "desc": "蒙版颜色。", - "name": "STYLE_ID_MASK_COLOR" - }, - { - "desc": "字体名称。", - "name": "STYLE_ID_FONT_NAME" - }, - { - "desc": "字体大小。", - "name": "STYLE_ID_FONT_SIZE" - }, - { - "desc": "字体风格(粗体、斜体等)。", - "name": "STYLE_ID_FONT_STYLE" - }, - { - "desc": "文本颜色。", - "name": "STYLE_ID_TEXT_COLOR" - }, - { - "desc": "高亮文本的字体名称。", - "name": "STYLE_ID_HIGHLIGHT_FONT_NAME" - }, - { - "desc": "高亮文本的字体大小。", - "name": "STYLE_ID_HIGHLIGHT_FONT_SIZE" - }, - { - "desc": "高亮文本的文本颜色。", - "name": "STYLE_ID_HIGHLIGHT_TEXT_COLOR" - }, - { - "desc": "提示文本颜色。", - "name": "STYLE_ID_TIPS_TEXT_COLOR" - }, - { - "desc": "文本水平对齐的方式。", - "name": "STYLE_ID_TEXT_ALIGN_H" - }, - { - "desc": "文本垂直对齐的方式。", - "name": "STYLE_ID_TEXT_ALIGN_V" - }, - { - "desc": "边框颜色。", - "name": "STYLE_ID_BORDER_COLOR" - }, - { - "desc": "边框线宽。", - "name": "STYLE_ID_BORDER_WIDTH" - }, - { - "desc": "边框类型。", - "name": "STYLE_ID_BORDER" - }, - { - "desc": "图片的名称。", - "name": "STYLE_ID_BG_IMAGE" - }, - { - "desc": "图片的显示方式。", - "name": "STYLE_ID_BG_IMAGE_DRAW_TYPE" - }, - { - "desc": "图标的名称。", - "name": "STYLE_ID_ICON" - }, - { - "desc": "图片的名称。", - "name": "STYLE_ID_FG_IMAGE" - }, - { - "desc": "图片的显示方式。", - "name": "STYLE_ID_FG_IMAGE_DRAW_TYPE" - }, - { - "desc": "间距。", - "name": "STYLE_ID_SPACER" - }, - { - "desc": "边距。", - "name": "STYLE_ID_MARGIN" - }, - { - "desc": "左边距。", - "name": "STYLE_ID_MARGIN_LEFT" - }, - { - "desc": "右边距。", - "name": "STYLE_ID_MARGIN_RIGHT" - }, - { - "desc": "顶边距。", - "name": "STYLE_ID_MARGIN_TOP" - }, - { - "desc": "底边距。", - "name": "STYLE_ID_MARGIN_BOTTOM" - }, - { - "desc": "图标的位置。", - "name": "STYLE_ID_ICON_AT" - }, - { - "desc": "Active图标的名称。", - "name": "STYLE_ID_ACTIVE_ICON" - }, - { - "desc": "X方向的偏移,方便实现按下的效果。", - "name": "STYLE_ID_X_OFFSET" - }, - { - "desc": "Y方向的偏移,方便实现按下的效果。", - "name": "STYLE_ID_Y_OFFSET" - }, - { - "desc": "编辑器中选中区域的背景颜色。", - "name": "STYLE_ID_SELECTED_BG_COLOR" - }, - { - "desc": "编辑器中选中区域的前景颜色。", - "name": "STYLE_ID_SELECTED_FG_COLOR" - }, - { - "desc": "编辑器中选中区域的文本颜色。", - "name": "STYLE_ID_SELECTED_TEXT_COLOR" - }, - { - "desc": "圆角半径(仅在WITH_VGCANVAS定义时生效)。", - "name": "STYLE_ID_ROUND_RADIUS" - }, - { - "desc": "左上角圆角半径(仅在WITH_VGCANVAS定义时生效)。", - "name": "STYLE_ID_ROUND_RADIUS_TOP_LETF" - }, - { - "desc": "右上角圆角半径(仅在WITH_VGCANVAS定义时生效)。", - "name": "STYLE_ID_ROUND_RADIUS_TOP_RIGHT" - }, - { - "desc": "左下角圆角半径(仅在WITH_VGCANVAS定义时生效)。", - "name": "STYLE_ID_ROUND_RADIUS_BOTTOM_LETF" - }, - { - "desc": "右下角圆角半径(仅在WITH_VGCANVAS定义时生效)。", - "name": "STYLE_ID_ROUND_RADIUS_BOTTOM_RIGHT" - }, - { - "desc": "子控件布局参数。", - "name": "STYLE_ID_CHILDREN_LAYOUT" - }, - { - "desc": "控件布局参数。", - "name": "STYLE_ID_SELF_LAYOUT" - } - ], - "header": "base/style.h", - "name": "style_id_t", - "prefix": "STYLE_ID_", - "annotation": { - "scriptable": true, - "string": true - }, - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "style_t*", - "name": "s", - "desc": "style对象。" - }, - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "widget状态改变时,通知style更新数据。", - "name": "style_notify_widget_state_changed", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "style_t*", - "name": "s", - "desc": "style对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "检查style对象是否有效", - "name": "style_is_valid", - "return": { - "type": "bool_t", - "desc": "返回是否有效。" - } - }, - { - "params": [ - { - "type": "style_t*", - "name": "s", - "desc": "style对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "属性名。" - }, - { - "type": "int32_t", - "name": "defval", - "desc": "缺省值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取指定name的整数格式的值。", - "name": "style_get_int", - "return": { - "type": "int32_t", - "desc": "返回整数格式的值。" - } - }, - { - "params": [ - { - "type": "style_t*", - "name": "s", - "desc": "style对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "属性名。" - }, - { - "type": "color_t", - "name": "defval", - "desc": "缺省值。" - } - ], - "annotation": {}, - "desc": "获取指定name的颜色值。", - "name": "style_get_color", - "return": { - "type": "color_t", - "desc": "返回颜色值。" - } - }, - { - "params": [ - { - "type": "style_t*", - "name": "s", - "desc": "style对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "属性名。" - }, - { - "type": "const char*", - "name": "defval", - "desc": "缺省值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取指定name的字符串格式的值。", - "name": "style_get_str", - "return": { - "type": "const char*", - "desc": "返回字符串格式的值。" - } - }, - { - "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": "value", - "desc": "值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置指定状态的指定属性的值(仅仅对mutable的style有效)。", - "name": "style_set", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "style_t*", - "name": "s", - "desc": "style对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "检查style是否是mutable的。", - "name": "style_is_mutable", - "return": { - "type": "bool_t", - "desc": "返回TRUE表示是,否则表示不是。" - } - }, - { - "params": [ - { - "type": "style_t*", - "name": "s", - "desc": "style对象。" - } - ], - "annotation": {}, - "desc": "销毁style对象", - "name": "style_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "const char*", - "name": "name", - "desc": "名称。" - }, - { - "type": "const char*", - "name": "value", - "desc": "值。" - }, - { - "type": "value_t*", - "name": "out", - "desc": "返回的值。" - } - ], - "annotation": {}, - "desc": "对值进行正规化。", - "name": "style_normalize_value", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [], - "header": "base/style.h", - "desc": "控件风格。\n\nwidget从style对象中,获取诸如字体、颜色和图片相关的参数,根据这些参数来绘制界面。\n\n```c\nstyle_t* style = widget->astyle;\nint32_t margin = style_get_int(style, STYLE_ID_MARGIN, 2);\nint32_t icon_at = style_get_int(style, STYLE_ID_ICON_AT, ICON_AT_AUTO);\nuint16_t font_size = style_get_int(style, STYLE_ID_FONT_SIZE, TK_DEFAULT_FONT_SIZE);\n```\n\n属性名称的请参考[style\\_id](style_id_t.md)", - "name": "style_t", - "annotation": { - "scriptable": true - }, - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "asset_info_t*", - "name": "res", - "desc": "数据资源。" - } - ], - "annotation": { - "constructor": true - }, - "desc": "创建联想字对象。", - "name": "suggest_words_create", - "return": { - "type": "suggest_words_t*", - "desc": "返回联想字对象。" - } - }, - { - "params": [ - { - "type": "suggest_words_t*", - "name": "suggest_words", - "desc": "联想字对象。" - }, - { - "type": "wchar_t", - "name": "c", - "desc": "字符。" - } - ], - "annotation": {}, - "desc": "查找prefix对应的联想字列表,成功后会更新words/words_nr。", - "name": "suggest_words_find", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "suggest_words_t*", - "name": "suggest_words", - "desc": "联想字对象。" - } - ], - "annotation": {}, - "desc": "@deconstructor\n销毁联想字对象。", - "name": "suggest_words_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [ - { - "name": "words", - "desc": "联想字列表。find函数执行成功后会更新。", - "type": "char*", - "annotation": { - "private": true - } - }, - { - "name": "words_nr", - "desc": "联想字/词个数。find函数执行成功后会更新。", - "type": "uint32_t", - "annotation": { - "private": true - } - } - ], - "header": "base/suggest_words.h", - "desc": "输入法联想字词。", - "name": "suggest_words_t", - "level": 1 - }, - { - "type": "class", - "methods": [], - "events": [], - "properties": [], - "header": "base/text_edit.h", - "desc": "", - "name": "text_edit_state_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件" - }, - { - "type": "boo_t", - "name": "single_line", - "desc": "是否是单行编辑器。" - } - ], - "annotation": {}, - "desc": "创建text_edit对象", - "name": "text_edit_create", - "return": { - "type": "widget_t*", - "desc": "对象。" - } - }, - { - "params": [ - { - "type": "text_edit_t*", - "name": "text_edit", - "desc": "text_edit对象。" - }, - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - } - ], - "annotation": {}, - "desc": "设置canvas对象。", - "name": "text_edit_set_canvas", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "text_edit_t*", - "name": "text_edit", - "desc": "text_edit对象。" - }, - { - "type": "xy_t", - "name": "x", - "desc": "x坐标。" - }, - { - "type": "xy_t", - "name": "y", - "desc": "y坐标。" - } - ], - "annotation": {}, - "desc": "处理点击事件。", - "name": "text_edit_click", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "text_edit_t*", - "name": "text_edit", - "desc": "text_edit对象。" - }, - { - "type": "xy_t", - "name": "x", - "desc": "x坐标。" - }, - { - "type": "xy_t", - "name": "y", - "desc": "y坐标。" - } - ], - "annotation": {}, - "desc": "处理拖动事件。", - "name": "text_edit_drag", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "text_edit_t*", - "name": "text_edit", - "desc": "text_edit对象。" - }, - { - "type": "const wchar_t*", - "name": "str", - "desc": "文本。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "文本长度。" - } - ], - "annotation": {}, - "desc": "粘贴文本。", - "name": "text_edit_paste", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "text_edit_t*", - "name": "text_edit", - "desc": "text_edit对象。" - } - ], - "annotation": {}, - "desc": "剪切文本。", - "name": "text_edit_cut", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "text_edit_t*", - "name": "text_edit", - "desc": "text_edit对象。" - } - ], - "annotation": {}, - "desc": "拷贝文本。", - "name": "text_edit_copy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "text_edit_t*", - "name": "text_edit", - "desc": "text_edit对象。" - }, - { - "type": "key_event_t*", - "name": "evt", - "desc": "event" - } - ], - "annotation": {}, - "desc": "处理按键事件。", - "name": "text_edit_key_down", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "text_edit_t*", - "name": "text_edit", - "desc": "text_edit对象。" - }, - { - "type": "key_event_t*", - "name": "evt", - "desc": "event" - } - ], - "annotation": {}, - "desc": "处理按键事件。", - "name": "text_edit_key_up", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "text_edit_t*", - "name": "text_edit", - "desc": "text_edit对象。" - }, - { - "type": "uint32_t", - "name": "start", - "desc": "起始偏移。" - }, - { - "type": "uint32_t", - "name": "end", - "desc": "结束偏移。" - } - ], - "annotation": {}, - "desc": "选择指定范围的文本。", - "name": "text_edit_set_select", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "text_edit_t*", - "name": "text_edit", - "desc": "text_edit对象。" - } - ], - "annotation": {}, - "desc": "全选。", - "name": "text_edit_select_all", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "text_edit_t*", - "name": "text_edit", - "desc": "text_edit对象。" - } - ], - "annotation": {}, - "desc": "取消选择。", - "name": "text_edit_unselect", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "text_edit_t*", - "name": "text_edit", - "desc": "text_edit对象。" - }, - { - "type": "uint32_t", - "name": "cursor", - "desc": "光标偏移。" - } - ], - "annotation": {}, - "desc": "设置光标位置。", - "name": "text_edit_set_cursor", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "text_edit_t*", - "name": "text_edit", - "desc": "text_edit对象。" - } - ], - "annotation": {}, - "desc": "获取光标位置。", - "name": "text_edit_get_cursor", - "return": { - "type": "uin32_t", - "desc": "返回光标的位置。" - } - }, - { - "params": [ - { - "type": "text_edit_t*", - "name": "text_edit", - "desc": "text_edit对象。" - }, - { - "type": "text_edit_state_t*", - "name": "state", - "desc": "状态。" - } - ], - "annotation": {}, - "desc": "获取编辑器的状态。", - "name": "text_edit_get_state", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "text_edit_t*", - "name": "text_edit", - "desc": "text_edit对象。" - }, - { - "type": "bool_t", - "name": "wrap_word", - "desc": "是否自动折行。" - } - ], - "annotation": {}, - "desc": "设置是否自动折行。", - "name": "text_edit_set_wrap_word", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "text_edit_t*", - "name": "text_edit", - "desc": "text_edit对象。" - } - ], - "annotation": {}, - "desc": "如果caret可见,将其设置为不可见。 如果caret不可见,将其设置为可见。", - "name": "text_edit_invert_caret_visible", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "text_edit_t*", - "name": "text_edit", - "desc": "text_edit对象。" - }, - { - "type": "bool_t", - "name": "caret_visible", - "desc": "是否可见。" - } - ], - "annotation": {}, - "desc": "设置光标的看见性。", - "name": "text_edit_set_caret_visible", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "text_edit_t*", - "name": "text_edit", - "desc": "text_edit对象。" - }, - { - "type": "uint32_t", - "name": "max_rows", - "desc": "最大行数。" - } - ], - "annotation": {}, - "desc": "设置最大行数。", - "name": "text_edit_set_max_rows", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "text_edit_t*", - "name": "text_edit", - "desc": "text_edit对象。" - }, - { - "type": "bool_t", - "name": "mask", - "desc": "是否马赛克字符。" - } - ], - "annotation": {}, - "desc": "设置是否马赛克字符(用于密码)。", - "name": "text_edit_set_mask", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "text_edit_t*", - "name": "text_edit", - "desc": "text_edit对象。" - }, - { - "type": "const char*", - "name": "tips", - "desc": "提示信息。" - } - ], - "annotation": {}, - "desc": "设置提示信息。", - "name": "text_edit_set_tips", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "text_edit_t*", - "name": "text_edit", - "desc": "text_edit对象。" - }, - { - "type": "wchar_t", - "name": "mask_char", - "desc": "马赛克字符。" - } - ], - "annotation": {}, - "desc": "设置马赛克字符。", - "name": "text_edit_set_mask_char", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "text_edit_t*", - "name": "text_edit", - "desc": "text_edit对象。" - }, - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - } - ], - "annotation": {}, - "desc": "绘制文本。", - "name": "text_edit_paint", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "text_edit_t*", - "name": "text_edit", - "desc": "text_edit对象。" - } - ], - "annotation": {}, - "desc": "重新排版。", - "name": "text_edit_layout", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "text_edit_t*", - "name": "text_edit", - "desc": "text_edit对象。" - }, - { - "type": "int32_t", - "name": "ox", - "desc": "x偏移量。" - }, - { - "type": "int32_t", - "name": "oy", - "desc": "y偏移量。" - } - ], - "annotation": {}, - "desc": "设置滚动偏移。", - "name": "text_edit_set_offset", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "text_edit_t*", - "name": "text_edit", - "desc": "text_edit对象。" - }, - { - "type": "text_edit_on_state_changed_t", - "name": "on_state_changed", - "desc": "回调函数。" - }, - { - "type": "void*", - "name": "ctx", - "desc": "回调函数上下文。" - } - ], - "annotation": {}, - "desc": "设置状态改变回调函数。", - "name": "text_edit_set_on_state_changed", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "text_edit_t*", - "name": "text_edit", - "desc": "text_edit对象。" - } - ], - "annotation": {}, - "desc": "销毁text_edit对象。", - "name": "text_edit_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "text_edit_t*", - "name": "text_edit", - "desc": "text_edit对象。" - } - ], - "annotation": {}, - "desc": "清除预编辑文本。", - "name": "text_edit_preedit_clear", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "text_edit_t*", - "name": "text_edit", - "desc": "text_edit对象。" - } - ], - "annotation": {}, - "desc": "进入预编辑状态。", - "name": "text_edit_preedit", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "text_edit_t*", - "name": "text_edit", - "desc": "text_edit对象。" - } - ], - "annotation": {}, - "desc": "提交预编辑的文本,并退出预编辑状态。", - "name": "text_edit_preedit_confirm", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "text_edit_t*", - "name": "text_edit", - "desc": "text_edit对象。" - } - ], - "annotation": {}, - "desc": "取消预编辑的文本,并退出预编辑状态。", - "name": "text_edit_preedit_abort", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [], - "header": "base/text_edit.h", - "desc": "", - "name": "text_edit_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [], - "annotation": { - "constructor": true, - "scriptable": true - }, - "desc": "获取缺省的主题对象。", - "name": "theme", - "alias": "theme_instance", - "return": { - "type": "theme_t*", - "desc": "返回主题对象。" - } - }, - { - "params": [ - { - "type": "theme_t*", - "name": "theme", - "desc": "主题对象。" - } - ], - "annotation": {}, - "desc": "设置缺省的主题对象。", - "name": "theme_set", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "const uint8_t*", - "name": "data", - "desc": "主题数据。" - } - ], - "annotation": { - "constructor": true - }, - "desc": "创建主题对象。", - "name": "theme_create", - "return": { - "type": "theme_t*", - "desc": "返回主题对象。" - } - }, - { - "params": [ - { - "type": "theme_t*", - "name": "theme", - "desc": "主题对象。" - }, - { - "type": "const uint8_t*", - "name": "data", - "desc": "主题数据。" - } - ], - "annotation": { - "constructor": true - }, - "desc": "初始化主题对象。", - "name": "theme_init", - "return": { - "type": "theme_t*", - "desc": "返回主题对象。" - } - }, - { - "params": [ - { - "type": "theme_t*", - "name": "data", - "desc": "主题对象。" - }, - { - "type": "const char*", - "name": "widget_type", - "desc": "控件的类型名。" - }, - { - "type": "const char*", - "name": "name", - "desc": "style的名称。" - }, - { - "type": "const char*", - "name": "widget_state", - "desc": "控件的状态。" - } - ], - "annotation": {}, - "desc": "查找满足条件的style。", - "name": "theme_find_style", - "return": { - "type": "theme_t*", - "desc": "返回主题对象。" - } - }, - { - "params": [ - { - "type": "theme_t*", - "name": "theme", - "desc": "主题对象。" - } - ], - "annotation": {}, - "desc": "析构主题对象。", - "name": "theme_deinit", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "theme_t*", - "name": "theme", - "desc": "主题对象。" - } - ], - "annotation": {}, - "desc": "析构并释放主题对象。", - "name": "theme_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [], - "header": "base/theme.h", - "desc": "主题。\n\n负责管理缺省的主题数据,方便实现style\\_const。", - "name": "theme_t", - "annotation": { - "scriptable": true - }, - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "timer_func_t", - "name": "on_timer", - "desc": "timer回调函数。" - }, - { - "type": "void*", - "name": "ctx", - "desc": "timer回调函数的上下文。" - }, - { - "type": "uint32_t", - "name": "duration", - "desc": "时间。" - } - ], - "annotation": { - "scriptable": "custom", - "static": true - }, - "desc": "增加一个timer。", - "name": "timer_add", - "return": { - "type": "uint32_t", - "desc": "返回timer的ID,TK_INVALID_ID表示失败。" - } - }, - { - "params": [ - { - "type": "timer_func_t", - "name": "", - "desc": "r" - }, - { - "type": "void*", - "name": "ctx", - "desc": "timer回调函数的上下文。" - }, - { - "type": "uint32_t", - "name": "duration", - "desc": "时间。" - } - ], - "annotation": { - "static": true - }, - "desc": "用于非GUI线程增加一个timer,本函数向主循环的事件队列中发送一个增加timer的请求。\ntimer回调函数,回调函数返回RET_REPEAT,则下次继续执行,否则自动移出。", - "name": "timer_queue", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "uint32_t", - "name": "timer_id", - "desc": "timerID。" - } - ], - "annotation": { - "scriptable": true, - "static": true - }, - "desc": "删除指定的timer。", - "name": "timer_remove", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "uint32_t", - "name": "timer_id", - "desc": "timerID。" - } - ], - "annotation": { - "scriptable": true, - "static": true - }, - "desc": "重置指定的timer,重置之后定时器重新开始计时。", - "name": "timer_reset", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "uint32_t", - "name": "timer_id", - "desc": "timerID。" - } - ], - "annotation": { - "scriptable": true, - "static": true - }, - "desc": "挂起指定的timer,一般用于不断循环触发的计时器。", - "name": "timer_suspend", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "uint32_t", - "name": "timer_id", - "desc": "timerID。" - } - ], - "annotation": { - "scriptable": true, - "static": true - }, - "desc": "唤醒挂起指定的timer,并且重置定时器重新开始计时", - "name": "timer_resume", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "uint32_t", - "name": "timer_id", - "desc": "timerID。" - }, - { - "type": "uint32_t", - "name": "duration", - "desc": "新的时间。" - } - ], - "annotation": { - "scriptable": true, - "static": true - }, - "desc": "修改指定的timer的duration,修改之后定时器重新开始计时。", - "name": "timer_modify", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "uint32_t", - "name": "timer_id", - "desc": "timerID。" - }, - { - "type": "tk_destroy_t", - "name": "on_destroy", - "desc": "回调函数。" - }, - { - "type": "void*", - "name": "on_destroy_ctx", - "desc": "回调函数上下文。" - } - ], - "annotation": {}, - "desc": "设置一个回调函数,在timer被销毁时调用(方便脚本语言去释放回调函数)。", - "name": "timer_set_on_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [], - "annotation": { - "static": true - }, - "desc": "返回timer的个数。", - "name": "timer_count", - "return": { - "type": "uint32_t", - "desc": "返回timer的个数。" - } - }, - { - "params": [], - "annotation": { - "static": true - }, - "desc": "返回最近的timer到期时间。", - "name": "timer_next_time", - "return": { - "type": "uint32_t", - "desc": "返回最近的timer到期时间。" - } - } - ], - "events": [], - "properties": [], - "header": "base/timer.h", - "desc": "定时器系统。\n\n> 本定时器精度较低,最高精度为1000/FPS,如果需要高精度的定时器,请用OS提供的定时器。\n\n示例:\n\n```c\nstatic ret_t my_on_timer(const timer_info_t* info) {\nwidget_t* widget = WIDGET(info->ctx);\n...\nreturn RET_REPEAT;\n}\n\n...\n\ntimer_add(my_on_timer, widget, 1000);\n```\n> 在非GUI线程请用timer\\_queue。", - "name": "timer_t", - "annotation": { - "scriptable": true, - "fake": true - }, - "level": 1 - }, - { - "type": "enum", - "desc": "LCD旋转角度。", - "consts": [ - { - "desc": "LCD没有旋转。", - "name": "LCD_ORIENTATION_0" - }, - { - "desc": "LCD旋转90度。", - "name": "LCD_ORIENTATION_90" - }, - { - "desc": "LCD旋转180度。", - "name": "LCD_ORIENTATION_180" - }, - { - "desc": "LCD旋转270度。", - "name": "LCD_ORIENTATION_270" - } - ], - "header": "base/types_def.h", - "name": "lcd_orientation_t", - "prefix": "LCD_ORIENTATION_", - "level": 1 - }, - { - "type": "enum", - "desc": "垂直对齐的常量定义。", - "consts": [ - { - "desc": "无效对齐方式。", - "name": "ALIGN_V_NONE" - }, - { - "desc": "居中对齐。", - "name": "ALIGN_V_MIDDLE" - }, - { - "desc": "顶部对齐。", - "name": "ALIGN_V_TOP" - }, - { - "desc": "底部对齐。", - "name": "ALIGN_V_BOTTOM" - } - ], - "header": "base/types_def.h", - "name": "align_v_t", - "prefix": "ALIGN_V_", - "annotation": { - "scriptable": true - }, - "level": 1 - }, - { - "type": "enum", - "desc": "水平对齐的常量定义。", - "consts": [ - { - "desc": "无效对齐方式。", - "name": "ALIGN_H_NONE" - }, - { - "desc": "居中对齐。", - "name": "ALIGN_H_CENTER" - }, - { - "desc": "左边对齐。", - "name": "ALIGN_H_LEFT" - }, - { - "desc": "右边对齐。", - "name": "ALIGN_H_RIGHT" - } - ], - "header": "base/types_def.h", - "name": "align_h_t", - "prefix": "ALIGN_H_", - "annotation": { - "scriptable": true - }, - "level": 1 - }, - { - "type": "enum", - "desc": "控件边框类型。", - "consts": [ - { - "desc": "无边框。", - "name": "BORDER_NONE" - }, - { - "desc": "左边框线。", - "name": "BORDER_LEFT" - }, - { - "desc": "右边框线。", - "name": "BORDER_RIGHT" - }, - { - "desc": "上边框线。", - "name": "BORDER_TOP" - }, - { - "desc": "下边框线。", - "name": "BORDER_BOTTOM" - }, - { - "desc": "全边框线。", - "name": "BORDER_ALL" - } - ], - "header": "base/types_def.h", - "name": "border_type_t", - "prefix": "BORDER_TYPE_", - "level": 1 - }, - { - "type": "enum", - "desc": "图标所在的位置。", - "consts": [ - { - "desc": "自动选择位置。", - "name": "ICON_AT_AUTO" - }, - { - "desc": "水平左边,垂直居中。", - "name": "ICON_AT_LEFT" - }, - { - "desc": "水平右边,垂直居中(not used now)。", - "name": "ICON_AT_RIGHT" - }, - { - "desc": "水平居中,垂直顶部(not used now)。", - "name": "ICON_AT_TOP" - }, - { - "desc": "水平居中,垂直低部(not used now)。", - "name": "ICON_AT_BOTTOM" - }, - { - "desc": "水平居中,垂直居中。", - "name": "ICON_AT_CENTRE" - }, - { - "desc": "水平居中,垂直居中。", - "name": "ICON_AT_CENTER" - } - ], - "header": "base/types_def.h", - "name": "icon_at_type_t", - "prefix": "ICON_AT", - "level": 1 - }, - { - "type": "enum", - "desc": "应用程序类型。", - "consts": [ - { - "desc": "嵌入式或移动APP", - "name": "APP_MOBILE" - }, - { - "desc": "模拟器。", - "name": "APP_SIMULATOR" - }, - { - "desc": "桌面应用程序。", - "name": "APP_DESKTOP" - } - ], - "header": "base/types_def.h", - "name": "app_type_t", - "prefix": "APP_", - "annotation": { - "scriptable": true - }, - "level": 1 - }, - { - "type": "enum", - "desc": "位图格式常量定义。", - "consts": [ - { - "desc": "无效格式。", - "name": "BITMAP_FMT_NONE" - }, - { - "desc": "一个像素占用4个字节,RGBA占一个字节,按内存地址递增。", - "name": "BITMAP_FMT_RGBA8888" - }, - { - "desc": "一个像素占用4个字节,ABGR占一个字节,按内存地址递增。", - "name": "BITMAP_FMT_ABGR8888" - }, - { - "desc": "一个像素占用4个字节,BGRA占一个字节,按内存地址递增。", - "name": "BITMAP_FMT_BGRA8888" - }, - { - "desc": "一个像素占用4个字节,ARGB占一个字节,按内存地址递增。", - "name": "BITMAP_FMT_ARGB8888" - }, - { - "desc": "一个像素占用2个字节,RGB分别占用5,6,5位, 按内存地址递增。", - "name": "BITMAP_FMT_RGB565" - }, - { - "desc": "一个像素占用2个字节,BGR分别占用5,6,5位, 按内存地址递增。", - "name": "BITMAP_FMT_BGR565" - }, - { - "desc": "一个像素占用3个字节,RGB占一个字节,按内存地址递增。", - "name": "BITMAP_FMT_RGB888" - }, - { - "desc": "一个像素占用3个字节,RGB占一个字节,按内存地址递增。", - "name": "BITMAP_FMT_BGR888" - }, - { - "desc": "一个像素占用1个字节。", - "name": "BITMAP_FMT_GRAY" - }, - { - "desc": "一个像素占用1比特。", - "name": "BITMAP_FMT_MONO" - } - ], - "header": "base/types_def.h", - "name": "bitmap_format_t", - "prefix": "BITMAP_FMT_", - "annotation": { - "scriptable": true - }, - "level": 1 - }, - { - "type": "enum", - "desc": "位图标志常量定义。", - "consts": [ - { - "desc": "无特殊标志。", - "name": "BITMAP_FLAG_NONE" - }, - { - "desc": "不透明图片。", - "name": "BITMAP_FLAG_OPAQUE" - }, - { - "desc": "图片内容不会变化。", - "name": "BITMAP_FLAG_IMMUTABLE" - }, - { - "desc": "OpenGL Texture, bitmap的id是有效的texture id。", - "name": "BITMAP_FLAG_TEXTURE" - }, - { - "desc": "如果是MUTABLE的图片,更新时需要设置此标志,底层可能会做特殊处理,比如更新图片到GPU。", - "name": "BITMAP_FLAG_CHANGED" - }, - { - "desc": "预乘alpha。", - "name": "BITMAP_FLAG_PREMULTI_ALPHA" - } - ], - "header": "base/types_def.h", - "name": "bitmap_flag_t", - "prefix": "BITMAP_FLAG_", - "annotation": { - "scriptable": true - }, - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "ui_builder_t*", - "name": "builder", - "desc": "builder对象。" - }, - { - "type": "const widget_desc_t*", - "name": "desc", - "desc": "widget描述信息。" - } - ], - "annotation": {}, - "desc": "ui\\_loader在解析到widget时,调用本函数进一步处理。", - "name": "ui_builder_on_widget_start", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "ui_builder_t*", - "name": "builder", - "desc": "builder对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "属性名。" - }, - { - "type": "const char*", - "name": "value", - "desc": "属性值。" - } - ], - "annotation": {}, - "desc": "ui\\_loader在解析到widget的属性时,调用本函数进一步处理。", - "name": "ui_builder_on_widget_prop", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "ui_builder_t*", - "name": "builder", - "desc": "builder对象。" - } - ], - "annotation": {}, - "desc": "ui\\_loader在解析到widget全部属性结束时,调用本函数进一步处理。", - "name": "ui_builder_on_widget_prop_end", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "ui_builder_t*", - "name": "builder", - "desc": "builder对象。" - } - ], - "annotation": {}, - "desc": "ui\\_loader在解析到widget结束时,调用本函数进一步处理。", - "name": "ui_builder_on_widget_end", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "ui_builder_t*", - "name": "builder", - "desc": "builder对象。" - } - ], - "annotation": {}, - "desc": "ui\\_loader在解析开始时,调用本函数做些准备工作。", - "name": "ui_builder_on_start", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "ui_builder_t*", - "name": "builder", - "desc": "builder对象。" - } - ], - "annotation": {}, - "desc": "ui\\_loader在解析结束时,调用本函数做些收尾工作。", - "name": "ui_builder_on_end", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [], - "header": "base/ui_builder.h", - "desc": "界面构造器接口。\n\n负责把ui\\_loader解析的数据进一步处理,至于具体做什么,由具体实现决定。常见的实现有:\n\n* 构建widget对象树。\n\n* 生成二进制的UI描述数据。\n\n* 生成XML格式的UI描述数据。\n\n```graphviz\n[default_style]\n\nui_builder_defualt_t -> ui_builder_t[arrowhead = \"empty\"]\nui_xml_writer_t -> ui_builder_t[arrowhead = \"empty\"]\nui_binary_writer_t -> ui_builder_t[arrowhead = \"empty\"]\n```", - "name": "ui_builder_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "event_t*", - "name": "evt", - "desc": "event对象。" - } - ], - "annotation": { - "static": true - }, - "desc": "请求反馈。", - "name": "ui_feedback_request", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "ui_on_feedback_t", - "name": "on_feedback", - "desc": "实际的处理函数。" - }, - { - "type": "void*", - "name": "ctx", - "desc": "回调函数的上下文。" - } - ], - "annotation": { - "static": true - }, - "desc": "初始化。\n设置实际的处理函数。", - "name": "ui_feedback_init", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [], - "header": "base/ui_feedback.h", - "desc": "提供按键音、触屏音和震动等反馈。", - "name": "ui_feedback_t", - "annotation": { - "fake": true - }, - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "ui_loader_t*", - "name": "loader", - "desc": "loader对象。" - }, - { - "type": "const uint8_t*", - "name": "data", - "desc": "数据。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "数据长度。" - }, - { - "type": "ui_builder_t*", - "name": "builder", - "desc": "负责进一步处理,比如构建UI界面。" - } - ], - "annotation": {}, - "desc": "加载界面描述数据,然后分发给ui\\_builder,由ui\\_builder进一步处理。", - "name": "ui_loader_load", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "const char*", - "name": "name", - "desc": "资源名。" - } - ], - "annotation": {}, - "desc": "从指定的资源加载widget对象,通常用于加载非窗口的widget。\n\n>需要自己将widget加入窗口后,再调用widget\\_layout。", - "name": "ui_loader_load_widget", - "return": { - "type": "widget_t*", - "desc": "返回widget对象。" - } - } - ], - "events": [], - "properties": [], - "header": "base/ui_loader.h", - "desc": "UI加载器。\n\n负责从资源加载界面描述数据,然后分发给ui\\_builder,由ui\\_builder进一步处理。\n\n常见的实现有两种:\n\n* XML格式的加载器。\n\n* 二进制格式的加载器。\n\n```graphviz\n[default_style]\n\nui_loader_defualt_t -> ui_loader_t[arrowhead = \"empty\"]\nui_loader_xml_t -> ui_loader_t[arrowhead = \"empty\"]\n\n```", - "name": "ui_loader_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "velocity_t*", - "name": "v", - "desc": "velocity对象。" - } - ], - "annotation": {}, - "desc": "重置状态。", - "name": "velocity_reset", - "return": { - "type": "velocity_t*", - "desc": "返回velocity对象。" - } - }, - { - "params": [ - { - "type": "velocity_t*", - "name": "v", - "desc": "velocity对象。" - }, - { - "type": "uint32_t", - "name": "time", - "desc": "时间。" - }, - { - "type": "xy_t", - "name": "x", - "desc": "x坐标。" - }, - { - "type": "xy_t", - "name": "y", - "desc": "y坐标。" - } - ], - "annotation": {}, - "desc": "更新位置。", - "name": "velocity_update", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [], - "header": "base/velocity.h", - "desc": "velocity。", - "name": "velocity_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "uint32_t", - "name": "w", - "desc": "宽度" - }, - { - "type": "uint32_t", - "name": "h", - "desc": "高度" - }, - { - "type": "uint32_t", - "name": "stride", - "desc": "一行占用的字节数。" - }, - { - "type": "bitmap_format_t", - "name": "format", - "desc": "如果data是framebuffer,format指定data的格式。" - }, - { - "type": "void*", - "name": "data", - "desc": "framebuffer或其它ctx。" - } - ], - "annotation": { - "constructor": true - }, - "desc": "创建vgcanvas。", - "name": "vgcanvas_create", - "return": { - "type": "vgcanvas_t*", - "desc": "返回vgcanvas对象。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - } - ], - "annotation": { - "cast": true, - "scriptable": true - }, - "desc": "转换为vgcanvas对象(供脚本语言使用)。", - "name": "vgcanvas_cast", - "return": { - "type": "vgcanvas_t*", - "desc": "vgcanvas对象。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - }, - { - "type": "uint32_t", - "name": "w", - "desc": "宽度" - }, - { - "type": "uint32_t", - "name": "h", - "desc": "高度" - }, - { - "type": "uint32_t", - "name": "stride", - "desc": "一行占用的字节数。" - }, - { - "type": "bitmap_format_t", - "name": "format", - "desc": "如果data是framebuffer,format指定data的格式。" - }, - { - "type": "void*", - "name": "data", - "desc": "framebuffer或其它ctx。" - } - ], - "annotation": {}, - "desc": "重新初始化,系统内部调用。", - "name": "vgcanvas_reinit", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - } - ], - "annotation": {}, - "desc": "重置所有状态。", - "name": "vgcanvas_reset", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - } - ], - "annotation": {}, - "desc": "重置当前状态。", - "name": "vgcanvas_reset_curr_state", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "flush", - "name": "vgcanvas_flush", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - }, - { - "type": "const rect_t*", - "name": "dirty_rect", - "desc": "需要绘制的区域。" - } - ], - "annotation": {}, - "desc": "开始绘制,系统内部调用。", - "name": "vgcanvas_begin_frame", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - }, - { - "type": "float_t", - "name": "x", - "desc": "x坐标。" - }, - { - "type": "float_t", - "name": "y", - "desc": "y坐标。" - }, - { - "type": "float_t", - "name": "w", - "desc": "宽度。" - }, - { - "type": "float_t", - "name": "h", - "desc": "高度。" - }, - { - "type": "color_t", - "name": "c", - "desc": "颜色。" - } - ], - "annotation": {}, - "desc": "用颜色清除指定矩形区域。", - "name": "vgcanvas_clear_rect", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "清除之前的路径,并重新开始一条路径。", - "name": "vgcanvas_begin_path", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - }, - { - "type": "float_t", - "name": "x", - "desc": "x坐标。" - }, - { - "type": "float_t", - "name": "y", - "desc": "y坐标。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "移动当前点到指定点。", - "name": "vgcanvas_move_to", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - }, - { - "type": "float_t", - "name": "x", - "desc": "x坐标。" - }, - { - "type": "float_t", - "name": "y", - "desc": "y坐标。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "生成一条线段(从当前点到目标点)。", - "name": "vgcanvas_line_to", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - }, - { - "type": "float_t", - "name": "cpx", - "desc": "控制点x坐标。" - }, - { - "type": "float_t", - "name": "cpy", - "desc": "控制点y坐标。" - }, - { - "type": "float_t", - "name": "x", - "desc": "x坐标。" - }, - { - "type": "float_t", - "name": "y", - "desc": "y坐标。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "生成一条二次贝塞尔曲线。", - "name": "vgcanvas_quad_to", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - }, - { - "type": "float_t", - "name": "cp1x", - "desc": "控制点1x坐标。" - }, - { - "type": "float_t", - "name": "cp1y", - "desc": "控制点1y坐标。" - }, - { - "type": "float_t", - "name": "cp2x", - "desc": "控制点2x坐标。" - }, - { - "type": "float_t", - "name": "cp2y", - "desc": "控制点3y坐标。" - }, - { - "type": "float_t", - "name": "x", - "desc": "x坐标。" - }, - { - "type": "float_t", - "name": "y", - "desc": "y坐标。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "生成一条三次贝塞尔曲线。", - "name": "vgcanvas_bezier_to", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - }, - { - "type": "float_t", - "name": "x1", - "desc": "起始点x坐标。" - }, - { - "type": "float_t", - "name": "y1", - "desc": "起始点y坐标。" - }, - { - "type": "float_t", - "name": "x2", - "desc": "结束点x坐标。" - }, - { - "type": "float_t", - "name": "y2", - "desc": "结束点y坐标。" - }, - { - "type": "float_t", - "name": "r", - "desc": "半径。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "生成一条圆弧路径到指定点。", - "name": "vgcanvas_arc_to", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - }, - { - "type": "float_t", - "name": "x", - "desc": "原点x坐标。" - }, - { - "type": "float_t", - "name": "y", - "desc": "原点y坐标。" - }, - { - "type": "float_t", - "name": "r", - "desc": "半径。" - }, - { - "type": "float_t", - "name": "start_angle", - "desc": "起始角度。" - }, - { - "type": "float_t", - "name": "end_angle", - "desc": "结束角度。" - }, - { - "type": "bool_t", - "name": "ccw", - "desc": "是否逆时针。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "生成一条圆弧。", - "name": "vgcanvas_arc", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - }, - { - "type": "float_t", - "name": "x", - "desc": "x坐标。" - }, - { - "type": "float_t", - "name": "y", - "desc": "y坐标。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "检查点是否在当前路径中。", - "name": "vgcanvas_is_point_in_path", - "return": { - "type": "bool_t", - "desc": "返回TRUE表示在,否则表示不在。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - }, - { - "type": "float_t", - "name": "x", - "desc": "x坐标。" - }, - { - "type": "float_t", - "name": "y", - "desc": "y坐标。" - }, - { - "type": "float_t", - "name": "w", - "desc": "宽度。" - }, - { - "type": "float_t", - "name": "h", - "desc": "高度。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "生成一个矩形路径。", - "name": "vgcanvas_rect", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - }, - { - "type": "float_t", - "name": "x", - "desc": "x坐标。" - }, - { - "type": "float_t", - "name": "y", - "desc": "y坐标。" - }, - { - "type": "float_t", - "name": "w", - "desc": "宽度。" - }, - { - "type": "float_t", - "name": "h", - "desc": "高度。" - }, - { - "type": "float_t", - "name": "r", - "desc": "圆角半径。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "生成一个圆角矩形路径。", - "name": "vgcanvas_rounded_rect", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - }, - { - "type": "float_t", - "name": "x", - "desc": "x坐标。" - }, - { - "type": "float_t", - "name": "y", - "desc": "y坐标。" - }, - { - "type": "float_t", - "name": "rx", - "desc": "圆角半径。" - }, - { - "type": "float_t", - "name": "ry", - "desc": "圆角半径。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "生成一个椭圆路径。", - "name": "vgcanvas_ellipse", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "闭合路径。\n\n>闭合路径是指把起点和终点连接起来,形成一个封闭的多边形。", - "name": "vgcanvas_close_path", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - }, - { - "type": "bool_t", - "name": "dir", - "desc": "填充方法。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置路径填充实心与否。\n\n>CCW(1)为实心,CW(2)为镂空,设置其他则默认根据非零环绕规则判断(nonzero)。", - "name": "vgcanvas_path_winding", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - }, - { - "type": "float_t", - "name": "rad", - "desc": "角度" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "旋转。", - "name": "vgcanvas_rotate", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - }, - { - "type": "float_t", - "name": "x", - "desc": "x方向缩放比例。" - }, - { - "type": "float_t", - "name": "y", - "desc": "y方向缩放比例。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "缩放。", - "name": "vgcanvas_scale", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - }, - { - "type": "float_t", - "name": "x", - "desc": "x方向偏移。" - }, - { - "type": "float_t", - "name": "y", - "desc": "y方向偏移。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "平移。", - "name": "vgcanvas_translate", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - }, - { - "type": "float_t", - "name": "a", - "desc": "a" - }, - { - "type": "float_t", - "name": "b", - "desc": "b" - }, - { - "type": "float_t", - "name": "c", - "desc": "c" - }, - { - "type": "float_t", - "name": "d", - "desc": "d" - }, - { - "type": "float_t", - "name": "e", - "desc": "e" - }, - { - "type": "float_t", - "name": "f", - "desc": "f" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "变换矩阵。", - "name": "vgcanvas_transform", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - }, - { - "type": "float_t", - "name": "a", - "desc": "a" - }, - { - "type": "float_t", - "name": "b", - "desc": "b" - }, - { - "type": "float_t", - "name": "c", - "desc": "c" - }, - { - "type": "float_t", - "name": "d", - "desc": "d" - }, - { - "type": "float_t", - "name": "e", - "desc": "e" - }, - { - "type": "float_t", - "name": "f", - "desc": "f" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置变换矩阵。", - "name": "vgcanvas_set_transform", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - }, - { - "type": "float_t", - "name": "x", - "desc": "x坐标。" - }, - { - "type": "float_t", - "name": "y", - "desc": "y坐标。" - }, - { - "type": "float_t", - "name": "w", - "desc": "宽度。" - }, - { - "type": "float_t", - "name": "h", - "desc": "高度。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "矩形裁剪。", - "name": "vgcanvas_clip_rect", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - }, - { - "type": "float_t", - "name": "x", - "desc": "x坐标。" - }, - { - "type": "float_t", - "name": "y", - "desc": "y坐标。" - }, - { - "type": "float_t", - "name": "w", - "desc": "宽度。" - }, - { - "type": "float_t", - "name": "h", - "desc": "高度。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置一个与前一个裁剪区做交集的矩形裁剪区。\n如果下面这种情况,则不能直接调用 rect_intersect 函数来做矩形交集和 vgcanvas_clip_rect 函数设置裁剪区,而采用本函数做交集。\n由于缩放和旋转以及平移会导致 vg 的坐标系和上一个裁剪区的坐标系不同,\n导致直接使用做交集的话,裁剪区会出错。\n\n```\nvgcanvas_clip_rect(vg, old_r.x, old_r.y, old_r.w, old_r.h);\nvgcanvas_save(vg);\nvgcanvas_scale(vg, scale_x, scale_y);\nvgcanvas_rotate(vg, TK_D2R(15));\nvgcanvas_intersect_clip_rect(vg, r.x, r.y, r.w, r.h);\n..................\nvgcanvas_restore(vg);\n```", - "name": "vgcanvas_intersect_clip_rect", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "填充多边形。", - "name": "vgcanvas_fill", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "画线。", - "name": "vgcanvas_stroke", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - }, - { - "type": "bool_t", - "name": "stroke", - "desc": "TRUE表示画线FALSE表示填充。" - }, - { - "type": "bitmap_t*", - "name": "img", - "desc": "图片。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "用图片填充/画多边形(可能存在可移植性问题,除非必要请勿使用)。\n多边形的顶点必须在图片范围内,可以通过矩阵变化画到不同的位置。", - "name": "vgcanvas_paint", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - }, - { - "type": "char*", - "name": "font", - "desc": "字体名称。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置字体的名称。", - "name": "vgcanvas_set_font", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - }, - { - "type": "float_t", - "name": "font", - "desc": "字体大小。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置字体的大小。", - "name": "vgcanvas_set_font_size", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - }, - { - "type": "char*", - "name": "value", - "desc": "取值:left|center|right,必须为常量字符串。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置文本水平对齐的方式。", - "name": "vgcanvas_set_text_align", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - }, - { - "type": "char*", - "name": "value", - "desc": "取值:top|middle|bottom,必须为常量字符串。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置文本垂直对齐的方式。", - "name": "vgcanvas_set_text_baseline", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - }, - { - "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": "vgcanvas_get_text_metrics", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - }, - { - "type": "char*", - "name": "text", - "desc": "text" - }, - { - "type": "float_t", - "name": "x", - "desc": "x坐标。" - }, - { - "type": "float_t", - "name": "y", - "desc": "y坐标。" - }, - { - "type": "float_t", - "name": "max_width", - "desc": "最大宽度。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "绘制文本。", - "name": "vgcanvas_fill_text", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - }, - { - "type": "char*", - "name": "text", - "desc": "text" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "测量文本的宽度。", - "name": "vgcanvas_measure_text", - "return": { - "type": "float_t", - "desc": "返回text的宽度。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - }, - { - "type": "bitmap_t*", - "name": "img", - "desc": "图片。" - }, - { - "type": "float_t", - "name": "sx", - "desc": "sx" - }, - { - "type": "float_t", - "name": "sy", - "desc": "sy" - }, - { - "type": "float_t", - "name": "sw", - "desc": "sw" - }, - { - "type": "float_t", - "name": "sh", - "desc": "sh" - }, - { - "type": "float_t", - "name": "dx", - "desc": "dx" - }, - { - "type": "float_t", - "name": "dy", - "desc": "dy" - }, - { - "type": "float_t", - "name": "dw", - "desc": "dw" - }, - { - "type": "float_t", - "name": "dh", - "desc": "dh" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "绘制图片。", - "name": "vgcanvas_draw_image", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - }, - { - "type": "bitmap_t*", - "name": "img", - "desc": "图片。" - }, - { - "type": "float_t", - "name": "sx", - "desc": "sx" - }, - { - "type": "float_t", - "name": "sy", - "desc": "sy" - }, - { - "type": "float_t", - "name": "sw", - "desc": "sw" - }, - { - "type": "float_t", - "name": "sh", - "desc": "sh" - }, - { - "type": "float_t", - "name": "dx", - "desc": "dx" - }, - { - "type": "float_t", - "name": "dy", - "desc": "dy" - }, - { - "type": "float_t", - "name": "dw", - "desc": "dw" - }, - { - "type": "float_t", - "name": "dh", - "desc": "dh" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "绘制图标。\n\n绘制图标时会根据屏幕密度进行自动缩放,而绘制普通图片时不会。", - "name": "vgcanvas_draw_icon", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - }, - { - "type": "bool_t", - "name": "value", - "desc": "是否启用反走样。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置是否启用反走样。", - "name": "vgcanvas_set_antialias", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - }, - { - "type": "float_t", - "name": "alpha", - "desc": "global alpha。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置全局透明度。", - "name": "vgcanvas_set_global_alpha", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - }, - { - "type": "float_t", - "name": "value", - "desc": "线宽。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置线条的宽度。", - "name": "vgcanvas_set_line_width", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - }, - { - "type": "color_t", - "name": "color", - "desc": "颜色。" - } - ], - "annotation": {}, - "desc": "设置填充颜色。", - "name": "vgcanvas_set_fill_color", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - }, - { - "type": "const char*", - "name": "color", - "desc": "颜色。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置填充颜色。", - "name": "vgcanvas_set_fill_color_str", - "alias": "vgcanvas_set_fill_color", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - }, - { - "type": "float_t", - "name": "sx", - "desc": "start x" - }, - { - "type": "float_t", - "name": "sy", - "desc": "start y" - }, - { - "type": "float_t", - "name": "ex", - "desc": "end x" - }, - { - "type": "float_t", - "name": "ey", - "desc": "end y" - }, - { - "type": "color_t", - "name": "icolor", - "desc": "开始颜色。" - }, - { - "type": "color_t", - "name": "ocolor", - "desc": "结束颜色。" - } - ], - "annotation": {}, - "desc": "设置填充颜色为线性渐变色。", - "name": "vgcanvas_set_fill_linear_gradient", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - }, - { - "type": "float_t", - "name": "cx", - "desc": "center x" - }, - { - "type": "float_t", - "name": "cy", - "desc": "center y" - }, - { - "type": "float_t", - "name": "inr", - "desc": "内环半径" - }, - { - "type": "float_t", - "name": "outr", - "desc": "外环半径。" - }, - { - "type": "color_t", - "name": "icolor", - "desc": "开始颜色。" - }, - { - "type": "color_t", - "name": "ocolor", - "desc": "结束颜色。" - } - ], - "annotation": {}, - "desc": "设置填充颜色为径向渐变色。", - "name": "vgcanvas_set_fill_radial_gradient", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - }, - { - "type": "color_t", - "name": "color", - "desc": "颜色。" - } - ], - "annotation": {}, - "desc": "设置线条颜色。", - "name": "vgcanvas_set_stroke_color", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - }, - { - "type": "const char*", - "name": "color", - "desc": "颜色。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置线条颜色。", - "name": "vgcanvas_set_stroke_color_str", - "alias": "vgcanvas_set_stroke_color", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - }, - { - "type": "float_t", - "name": "sx", - "desc": "start x" - }, - { - "type": "float_t", - "name": "sy", - "desc": "start y" - }, - { - "type": "float_t", - "name": "ex", - "desc": "end x" - }, - { - "type": "float_t", - "name": "ey", - "desc": "end y" - }, - { - "type": "color_t", - "name": "icolor", - "desc": "开始颜色。" - }, - { - "type": "color_t", - "name": "ocolor", - "desc": "结束颜色。" - } - ], - "annotation": {}, - "desc": "设置线条颜色为线性渐变色。", - "name": "vgcanvas_set_stroke_linear_gradient", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - }, - { - "type": "float_t", - "name": "cx", - "desc": "center x" - }, - { - "type": "float_t", - "name": "cy", - "desc": "center y" - }, - { - "type": "float_t", - "name": "inr", - "desc": "内环半径" - }, - { - "type": "float_t", - "name": "outr", - "desc": "外环半径。" - }, - { - "type": "color_t", - "name": "icolor", - "desc": "开始颜色。" - }, - { - "type": "color_t", - "name": "ocolor", - "desc": "结束颜色。" - } - ], - "annotation": {}, - "desc": "设置线条颜色为径向渐变色。", - "name": "vgcanvas_set_stroke_radial_gradient", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - }, - { - "type": "char*", - "name": "value", - "desc": "取值:butt|round|square,必须为常量字符串。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置line cap。", - "name": "vgcanvas_set_line_cap", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - }, - { - "type": "char*", - "name": "value", - "desc": "取值:bevel|round|miter,必须为常量字符串。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置line join。", - "name": "vgcanvas_set_line_join", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - }, - { - "type": "float_t", - "name": "value", - "desc": "miter limit" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置miter limit。", - "name": "vgcanvas_set_miter_limit", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "保存当前的状态。如颜色和矩阵等信息。\n\n> save/restore必须配套使用,否则可能导致状态混乱。", - "name": "vgcanvas_save", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "恢复上次save的状态。\n\n> save/restore必须配套使用,否则可能导致状态混乱。", - "name": "vgcanvas_restore", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - } - ], - "annotation": {}, - "desc": "结束绘制。系统内部调用。", - "name": "vgcanvas_end_frame", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vgcanvas", - "desc": "vgcanvas对象。" - } - ], - "annotation": {}, - "desc": "获取宽度。", - "name": "vgcanvas_get_width", - "return": { - "type": "wh_t", - "desc": "返回宽度。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vgcanvas", - "desc": "vgcanvas对象。" - } - ], - "annotation": {}, - "desc": "获取高度。", - "name": "vgcanvas_get_height", - "return": { - "type": "wh_t", - "desc": "返回高度。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - } - ], - "annotation": {}, - "desc": "释放vgcanvas对象的缓冲数据。", - "name": "vgcanvas_clear_cache", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "vgcanvas_t*", - "name": "vg", - "desc": "vgcanvas对象。" - } - ], - "annotation": {}, - "desc": "销毁vgcanvas对象。", - "name": "vgcanvas_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [ - { - "name": "w", - "desc": "canvas的宽度", - "type": "wh_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "h", - "desc": "canvas的高度", - "type": "wh_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "stride", - "desc": "一行占的字节", - "type": "uint32_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "ratio", - "desc": "显示比例。", - "type": "float_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "anti_alias", - "desc": "是否启用反走样功能。", - "type": "bool_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "line_width", - "desc": "线宽。", - "type": "float_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "global_alpha", - "desc": "全局alpha。", - "type": "float_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "miter_limit", - "desc": "miter\\_limit。\n@see http://www.w3school.com.cn/tags/canvas_miterlimit.asp", - "type": "float_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "line_cap", - "desc": "line\\_cap。\n@see http://www.w3school.com.cn/tags/canvas_linecap.asp", - "type": "const char*", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "line_join", - "desc": "line\\_join。\n@see http://www.w3school.com.cn/tags/canvas_linejoin.asp", - "type": "const char*", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "font", - "desc": "字体。", - "type": "char*", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "font_size", - "desc": "字体大小。", - "type": "float_t", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "text_align", - "desc": "文本对齐方式。\n\n@see http://www.w3school.com.cn/tags/canvas_textalign.asp", - "type": "const char*", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "text_baseline", - "desc": "文本基线。\n\n@see http://www.w3school.com.cn/tags/canvas_textbaseline.asp", - "type": "const char*", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "fill_color", - "desc": "填充颜色", - "type": "color_t", - "annotation": { - "readable": true - } - }, - { - "name": "stroke_color", - "desc": "线条颜色", - "type": "color_t", - "annotation": { - "readable": true - } - }, - { - "name": "buff;", - "desc": "frame buffer", - "type": "uint32_t*", - "annotation": { - "private": true - } - }, - { - "name": "format;", - "desc": "frame buffer format", - "type": "bitmap_format_t", - "annotation": { - "private": true - } - } - ], - "header": "base/vgcanvas.h", - "desc": "矢量图画布抽象基类。\n\n具体实现时可以使用agg,nanovg, cairo和skia等方式。\n\ncairo和skia体积太大,不适合嵌入式平台,但在PC平台也是一种选择。\n\n目前我们只提供了基于nanovg的实现,支持软件渲染和硬件渲染。\n\n我们对nanovg进行了一些改进:\n\n* 可以用agg/agge实现软件渲染(暂时不支持文本绘制)。\n\n* 可以用bgfx使用DirectX(Windows平台)和Metal(iOS)平台硬件加速。\n\n```graphviz\n[default_style]\n\nvgcanvas_cairo_t -> vgcanvas_t[arrowhead = \"empty\"]\nvgcanvas_nanovg_t -> vgcanvas_t[arrowhead = \"empty\"]\nopengl -> vgcanvas_nanovg_t[arrowhead = \"none\"]\nbgfx -> vgcanvas_nanovg_t[arrowhead = \"none\"]\nagg -> vgcanvas_nanovg_t[arrowhead = \"none\"]\nagge -> vgcanvas_nanovg_t[arrowhead = \"none\"]\nvgcanvas_skia_t -> vgcanvas_t[arrowhead = \"empty\"]\nvgcanvas_agge_t -> vgcanvas_t[arrowhead = \"empty\"]\n```\n\n示例:\n\n```c\nvgcanvas_t* vg = canvas_get_vgcanvas(c);\nvgcanvas_save(vg);\nvgcanvas_translate(vg, 0, 100);\n\nvgcanvas_set_line_width(vg, 1);\nvgcanvas_set_fill_color(vg, color_init(0xff, 0, 0, 0xff));\nvgcanvas_rect(vg, 5, 5, 100, 100);\nvgcanvas_fill(vg);\nvgcanvas_restore(vg);\n```\n\n>请参考:https://www.w3schools.com/tags/ref_canvas.asp", - "name": "vgcanvas_t", - "annotation": { - "scriptable": true - }, - "level": 1 - }, - { - "type": "enum", - "desc": "线帽类型。", - "consts": [ - { - "desc": "圆头。", - "name": "VGCANVAS_LINE_CAP_ROUND" - }, - { - "desc": "方头。", - "name": "VGCANVAS_LINE_CAP_SQUARE" - } - ], - "header": "base/vgcanvas.h", - "name": "vgcanvas_line_cap_t", - "prefix": "VGCANVAS_LINE_CAP_", - "annotation": { - "scriptable": true, - "string": true - }, - "level": 1 - }, - { - "type": "enum", - "desc": "线条连接类型。", - "consts": [ - { - "desc": "round。", - "name": "VGCANVAS_LINE_JOIN_ROUND" - }, - { - "desc": "bevel。", - "name": "VGCANVAS_LINE_JOIN_BEVEL" - }, - { - "desc": "mitter。", - "name": "VGCANVAS_LINE_JOIN_MITTER" - } - ], - "header": "base/vgcanvas.h", - "name": "vgcanvas_line_join_t", - "prefix": "VGCANVAS_LINE_JOIN_", - "annotation": { - "scriptable": true, - "string": true - }, - "level": 1 - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "动画应用的控件。" - }, - { - "type": "const char*", - "name": "params", - "desc": "参数。" - } - ], - "annotation": { - "global": true - }, - "desc": "创建animator对象。", - "name": "widget_animator_create", - "return": { - "type": "widget_animator_t*", - "desc": "动画对象。" - }, - "type": "method", - "header": "base/widget_animator_factory.h", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [], - "annotation": { - "constructor": true - }, - "desc": "获取缺省的控件动画管理器。", - "name": "widget_animator_manager", - "alias": "widget_animator_manager_instance", - "return": { - "type": "widget_animator_manager_t*", - "desc": "返回控件动画管理器。" - } - }, - { - "params": [ - { - "type": "widget_animator_manager_t*", - "name": "am", - "desc": "控件动画管理器。" - } - ], - "annotation": {}, - "desc": "设置缺省的控件动画管理器。", - "name": "widget_animator_manager_set", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [], - "annotation": { - "constructor": true - }, - "desc": "创建控件动画管理器。", - "name": "widget_animator_manager_create", - "return": { - "type": "widget_animator_manager_t*", - "desc": "返回控件动画管理器。" - } - }, - { - "params": [ - { - "type": "widget_animator_manager_t*", - "name": "am", - "desc": "控件动画管理器。" - } - ], - "annotation": { - "constructor": true - }, - "desc": "初始化控件动画管理器。", - "name": "widget_animator_manager_init", - "return": { - "type": "widget_animator_manager_t*", - "desc": "返回控件动画管理器。" - } - }, - { - "params": [ - { - "type": "widget_animator_manager_t*", - "name": "am", - "desc": "控件动画管理器。" - } - ], - "annotation": {}, - "desc": "析构控件动画管理器。", - "name": "widget_animator_manager_deinit", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_animator_manager_t*", - "name": "am", - "desc": "控件动画管理器。" - } - ], - "annotation": {}, - "desc": "析构并释放控件动画管理器。", - "name": "widget_animator_manager_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_animator_manager_t*", - "name": "am", - "desc": "控件动画管理器。" - }, - { - "type": "widget_animator_t*", - "name": "animator", - "desc": "动画对象。" - } - ], - "annotation": {}, - "desc": "添加指定的动画,动画在创建时调用本函数。", - "name": "widget_animator_manager_add", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_animator_manager_t*", - "name": "am", - "desc": "控件动画管理器。" - }, - { - "type": "widget_animator_t*", - "name": "animator", - "desc": "动画对象。" - } - ], - "annotation": {}, - "desc": "移出指定的动画,动画在销毁时调用本函数。。", - "name": "widget_animator_manager_remove", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_animator_manager_t*", - "name": "am", - "desc": "控件动画管理器。" - } - ], - "annotation": {}, - "desc": "获取动画个数。", - "name": "widget_animator_manager_count", - "return": { - "type": "ret_t", - "desc": "返回动画个数。" - } - }, - { - "params": [ - { - "type": "widget_animator_manager_t*", - "name": "am", - "desc": "控件动画管理器。" - }, - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "动画名称。" - } - ], - "annotation": {}, - "desc": "播放满足条件的动画。\n1.widget为NULL时,播放所有名称为name的动画。\n2.name为NULL时,播放所有widget相关的动画。\n3.widget和name均为NULL,播放所有动画。", - "name": "widget_animator_manager_start", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_animator_manager_t*", - "name": "am", - "desc": "控件动画管理器。" - }, - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "动画名称。" - } - ], - "annotation": {}, - "desc": "停止满足条件的动画。\n1.widget为NULL时,停止所有名称为name的动画。\n2.name为NULL时,停止所有widget相关的动画。\n3.widget和name均为NULL,停止所有动画。", - "name": "widget_animator_manager_stop", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_animator_manager_t*", - "name": "am", - "desc": "控件动画管理器。" - }, - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "动画名称。" - } - ], - "annotation": {}, - "desc": "暂停满足条件的动画。\n1.widget为NULL时,暂停所有名称为name的动画。\n2.name为NULL时,暂停所有widget相关的动画。\n3.widget和name均为NULL,暂停所有动画。", - "name": "widget_animator_manager_pause", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_animator_manager_t*", - "name": "am", - "desc": "控件动画管理器。" - }, - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "动画名称。" - } - ], - "annotation": {}, - "desc": "查找满足条件的动画。", - "name": "widget_animator_manager_find", - "return": { - "type": "widget_animator_t*", - "desc": "成功返回动画对象,失败返回NULL。" - } - }, - { - "params": [ - { - "type": "widget_animator_manager_t*", - "name": "am", - "desc": "控件动画管理器。" - }, - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "动画名称。" - } - ], - "annotation": {}, - "desc": "销毁满足条件的动画。", - "name": "widget_animator_manager_remove_all", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_animator_manager_t*", - "name": "am", - "desc": "控件动画管理器。" - }, - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "动画名称。" - }, - { - "type": "float_t", - "name": "time_scale", - "desc": "时间倍率。" - } - ], - "annotation": {}, - "desc": "设置时间倍率。\n设置动画的时间倍率,<0: 时间倒退,<1: 时间变慢,>1 时间变快。", - "name": "widget_animator_manager_set_time_scale", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_animator_manager_t*", - "name": "am", - "desc": "控件动画管理器。" - }, - { - "type": "uint32_t", - "name": "delta_time", - "desc": "流失的时间(毫秒)。" - } - ], - "annotation": {}, - "desc": "时间流失,调用本函数更新动画(public for test)。", - "name": "widget_animator_manager_time_elapse", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [ - { - "name": "time_scale", - "desc": "时间倍率,可以让时间变快或变慢。", - "type": "float_t" - } - ], - "header": "base/widget_animator_manager.h", - "desc": "控件动画管理器。", - "name": "widget_animator_manager_t", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "widget_animator_t*", - "name": "animator", - "desc": "动画对象。" - }, - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "uint32_t", - "name": "duration", - "desc": "动画持续时间。" - }, - { - "type": "uint32_t", - "name": "delay", - "desc": "动画执行时间。" - }, - { - "type": "easing_func_t", - "name": "", - "desc": "。" - } - ], - "annotation": {}, - "desc": "初始化。仅供子类内部使用。", - "name": "widget_animator_init", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_animator_t*", - "name": "animator", - "desc": "动画对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "名称。" - } - ], - "annotation": {}, - "desc": "设置名称。", - "name": "widget_animator_set_name", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_animator_t*", - "name": "animator", - "desc": "动画对象。" - }, - { - "type": "uint32_t", - "name": "yoyo_times", - "desc": "yoyo的次数,往返视为两次。" - } - ], - "annotation": {}, - "desc": "设置为yoyo模式。", - "name": "widget_animator_set_yoyo", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_animator_t*", - "name": "animator", - "desc": "动画对象。" - }, - { - "type": "uint32_t", - "name": "repeat_times", - "desc": "重复的次数。" - } - ], - "annotation": {}, - "desc": "设置为重复模式。", - "name": "widget_animator_set_repeat", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_animator_t*", - "name": "animator", - "desc": "动画对象。" - }, - { - "type": "bool_t", - "name": "value", - "desc": "是否为逆向模式。" - } - ], - "annotation": {}, - "desc": "设置为逆向模式。", - "name": "widget_animator_set_reversed", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_animator_t*", - "name": "animator", - "desc": "动画对象。" - }, - { - "type": "float_t", - "name": "time_scale", - "desc": "时间倍率。" - } - ], - "annotation": {}, - "desc": "设置时间倍率,用于实现时间加速减速和停滞的功能。", - "name": "widget_animator_set_time_scale", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_animator_t*", - "name": "animator", - "desc": "动画对象。" - }, - { - "type": "event_type_t", - "name": "", - "desc": "e" - }, - { - "type": "event_func_t", - "name": "on_event", - "desc": "事件处理函数。" - }, - { - "type": "void*", - "name": "ctx", - "desc": "事件处理函数上下文。" - } - ], - "annotation": { - "scriptable": "custom" - }, - "desc": "注册指定事件的处理函数。\n事件类型。目前支持:EVT_ANIM_START,EVT_ANIM_STOP,EVT_ANIM_PAUSE,EVT_ANIM_ONCE和EVT_ANIM_END。", - "name": "widget_animator_on", - "return": { - "type": "uint32_t", - "desc": "返回id,用于widget_animator_off。" - } - }, - { - "params": [ - { - "type": "widget_animator_t*", - "name": "animator", - "desc": "动画对象。" - }, - { - "type": "uint32_t", - "name": "id", - "desc": "widget_animator_on返回的ID。" - } - ], - "annotation": { - "scriptable": "custom" - }, - "desc": "注销指定事件的处理函数。", - "name": "widget_animator_off", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_animator_t*", - "name": "animator", - "desc": "动画对象。" - } - ], - "annotation": {}, - "desc": "启动动画。", - "name": "widget_animator_start", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_animator_t*", - "name": "animator", - "desc": "动画对象。" - } - ], - "annotation": {}, - "desc": "停止动画。", - "name": "widget_animator_stop", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_animator_t*", - "name": "animator", - "desc": "动画对象。" - } - ], - "annotation": {}, - "desc": "暂停动画。", - "name": "widget_animator_pause", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_animator_t*", - "name": "animator", - "desc": "动画对象。" - }, - { - "type": "bool_t", - "name": "destroy_when_done", - "desc": "完成时是否自动销毁动画对象。" - } - ], - "annotation": {}, - "desc": "设置完成时是否自动销毁动画对象(缺省销毁)。", - "name": "widget_animator_set_destroy_when_done", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_animator_t*", - "name": "animator", - "desc": "动画对象。" - } - ], - "annotation": {}, - "desc": "销毁animator对象。", - "name": "widget_animator_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [ - { - "name": "name", - "desc": "名称。", - "type": "char*" - }, - { - "name": "widget", - "desc": "控件对象。", - "type": "widget_t*", - "annotation": { - "private": true - } - }, - { - "name": "reversed", - "desc": "逆向运行,在yoyo模式下自动设置。", - "type": "bool_t", - "annotation": { - "private": true - } - }, - { - "name": "yoyo_times", - "desc": "yoyo剩余次数。", - "type": "uint32_t", - "annotation": { - "private": true - } - }, - { - "name": "repeat_times", - "desc": "重复剩余次数。", - "type": "uint32_t", - "annotation": { - "private": true - } - }, - { - "name": "now", - "desc": "当前时间(毫秒)。", - "type": "uint32_t", - "annotation": { - "private": true - } - }, - { - "name": "time_scale", - "desc": "时间倍率。", - "type": "float_t", - "annotation": { - "private": true - } - }, - { - "name": "start_time", - "desc": "起始时间(毫秒)。", - "type": "uint32_t", - "annotation": { - "private": true - } - }, - { - "name": "delay", - "desc": "延迟执行时间(毫秒)。", - "type": "uint32_t", - "annotation": { - "private": true - } - }, - { - "name": "duration", - "desc": "单次动画执行时间(毫秒)。", - "type": "uint32_t", - "annotation": { - "private": true - } - }, - { - "name": "state", - "desc": "动画的状态。", - "type": "animator_state_t", - "annotation": { - "private": true - } - }, - { - "name": "emitter", - "desc": "emitter", - "type": "uint32_t", - "annotation": { - "private": true - } - }, - { - "name": "destroy_when_done;", - "desc": "播放完成时是否自动销毁(缺省销毁)。", - "type": "bool_t", - "annotation": { - "private": true - } - }, - { - "name": "forever", - "desc": "是否永远播放(yoyo_times/repeat_times为0时,自动设置此标志)。", - "type": "bool_t", - "annotation": { - "private": true - } - }, - { - "name": "widget_destroy_id", - "desc": "widget_destroy_id。", - "type": "uint32_t", - "annotation": { - "private": true - } - }, - { - "name": "easing", - "desc": "插值函数。", - "type": "easing_func_t", - "annotation": { - "private": true - } - }, - { - "name": "update", - "desc": "update函数,子类需要实现。", - "type": "widget_animator_update_t", - "annotation": { - "private": true - } - }, - { - "name": "destroy", - "desc": "destroy函数,子类需要实现。", - "type": "widget_animator_destroy_t", - "annotation": { - "private": true - } - } - ], - "header": "base/widget_animator.h", - "desc": "控件动画接口。", - "name": "widget_animator_t", - "level": 1 - }, - { - "type": "enum", - "desc": "控件的属性。", - "consts": [ - { - "desc": "用于执行某些特殊的命令(比如控制动画的启停),主要是方便MVVM通过属性来控制动画。", - "name": "WIDGET_PROP_EXEC" - }, - { - "desc": "X坐标。", - "name": "WIDGET_PROP_X" - }, - { - "desc": "Y坐标。", - "name": "WIDGET_PROP_Y" - }, - { - "desc": "宽度。", - "name": "WIDGET_PROP_W" - }, - { - "desc": "高度。", - "name": "WIDGET_PROP_H" - }, - { - "desc": "inputing。", - "name": "WIDGET_PROP_INPUTING" - }, - { - "desc": "always on top。", - "name": "WIDGET_PROP_ALWAYS_ON_TOP" - }, - { - "desc": "caret x。", - "name": "WIDGET_PROP_CARET_X" - }, - { - "desc": "caret y。", - "name": "WIDGET_PROP_CARET_Y" - }, - { - "desc": "脏矩形超出控件本身大小的最大范围。", - "name": "WIDGET_PROP_DIRTY_RECT_TOLERANCE" - }, - { - "desc": "bidi type(rtl,ltr,auto,wrtl,wltr,lro,rlo)。", - "name": "WIDGET_PROP_BIDI" - }, - { - "desc": "Canvas。", - "name": "WIDGET_PROP_CANVAS" - }, - { - "desc": "Canvas。", - "name": "WIDGET_PROP_LOCALIZE_OPTIONS" - }, - { - "desc": "Native Window。", - "name": "WIDGET_PROP_NATIVE_WINDOW" - }, - { - "desc": "dialog highlight。", - "name": "WIDGET_PROP_HIGHLIGHT" - }, - { - "desc": "slider中的bar的的宽度或高度。", - "name": "WIDGET_PROP_BAR_SIZE" - }, - { - "desc": "不透明度。", - "name": "WIDGET_PROP_OPACITY" - }, - { - "desc": "最小宽度。", - "name": "WIDGET_PROP_MIN_W" - }, - { - "desc": "最大宽度。", - "name": "WIDGET_PROP_MAX_W" - }, - { - "desc": "根据子控件和文本自动调整大小。", - "name": "WIDGET_PROP_AUTO_ADJUST_SIZE" - }, - { - "desc": "窗口是否保持单例。", - "name": "WIDGET_PROP_SINGLE_INSTANCE" - }, - { - "desc": "子控件布局参数。", - "name": "WIDGET_PROP_CHILDREN_LAYOUT" - }, - { - "desc": "子控件布局参数(过时)。", - "name": "WIDGET_PROP_LAYOUT" - }, - { - "desc": "控件布局参数。", - "name": "WIDGET_PROP_SELF_LAYOUT" - }, - { - "desc": "layout宽度。", - "name": "WIDGET_PROP_LAYOUT_W" - }, - { - "desc": "layout高度。", - "name": "WIDGET_PROP_LAYOUT_H" - }, - { - "desc": "虚拟宽度。", - "name": "WIDGET_PROP_VIRTUAL_W" - }, - { - "desc": "虚拟高度。", - "name": "WIDGET_PROP_VIRTUAL_H" - }, - { - "desc": "名称。", - "name": "WIDGET_PROP_NAME" - }, - { - "desc": "类型。", - "name": "WIDGET_PROP_TYPE" - }, - { - "desc": "是否可以关闭。", - "name": "WIDGET_PROP_CLOSABLE" - }, - { - "desc": "鼠标指针。", - "name": "WIDGET_PROP_POINTER_CURSOR" - }, - { - "desc": "值。", - "name": "WIDGET_PROP_VALUE" - }, - { - "desc": "进度条反向显示。", - "name": "WIDGET_PROP_REVERSE" - }, - { - "desc": "长度。", - "name": "WIDGET_PROP_LENGTH" - }, - { - "desc": "自动换行。", - "name": "WIDGET_PROP_LINE_WRAP" - }, - { - "desc": "是否允许单词中换行。", - "name": "WIDGET_PROP_WORD_WRAP" - }, - { - "desc": "文本。", - "name": "WIDGET_PROP_TEXT" - }, - { - "desc": "待翻译文本。", - "name": "WIDGET_PROP_TR_TEXT" - }, - { - "desc": "style。", - "name": "WIDGET_PROP_STYLE" - }, - { - "desc": "是否启用。", - "name": "WIDGET_PROP_ENABLE" - }, - { - "desc": "是否启用按键音等反馈。", - "name": "WIDGET_PROP_FEEDBACK" - }, - { - "desc": "是否启用floating布局。", - "name": "WIDGET_PROP_FLOATING" - }, - { - "desc": "边距。", - "name": "WIDGET_PROP_MARGIN" - }, - { - "desc": "间距。", - "name": "WIDGET_PROP_SPACING" - }, - { - "desc": "左边距。", - "name": "WIDGET_PROP_LEFT_MARGIN" - }, - { - "desc": "右边距。", - "name": "WIDGET_PROP_RIGHT_MARGIN" - }, - { - "desc": "顶边距。", - "name": "WIDGET_PROP_TOP_MARGIN" - }, - { - "desc": "底边距。", - "name": "WIDGET_PROP_BOTTOM_MARGIN" - }, - { - "desc": "步长。", - "name": "WIDGET_PROP_STEP" - }, - { - "desc": "是否可见。", - "name": "WIDGET_PROP_VISIBLE" - }, - { - "desc": "是否接受用户事件。", - "name": "WIDGET_PROP_SENSITIVE" - }, - { - "desc": "控件动画。", - "name": "WIDGET_PROP_ANIMATION" - }, - { - "desc": "窗口动画。", - "name": "WIDGET_PROP_ANIM_HINT" - }, - { - "desc": "窗口设置为全部大小。", - "name": "WIDGET_PROP_FULLSCREEN" - }, - { - "desc": "禁用窗口动画。", - "name": "WIDGET_PROP_DISABLE_ANIM" - }, - { - "desc": "打开窗口时的动画。", - "name": "WIDGET_PROP_OPEN_ANIM_HINT" - }, - { - "desc": "关闭窗口时的动画。", - "name": "WIDGET_PROP_CLOSE_ANIM_HINT" - }, - { - "desc": "最小值。", - "name": "WIDGET_PROP_MIN" - }, - { - "desc": "软键盘上action按钮的文本。", - "name": "WIDGET_PROP_ACTION_TEXT" - }, - { - "desc": "提示信息。", - "name": "WIDGET_PROP_TIPS" - }, - { - "desc": "需要翻译的提示信息。", - "name": "WIDGET_PROP_TR_TIPS" - }, - { - "desc": "输入类型。", - "name": "WIDGET_PROP_INPUT_TYPE" - }, - { - "desc": "自定义软键盘资源名称。", - "name": "WIDGET_PROP_KEYBOARD" - }, - { - "desc": "缺省获得焦点的子控件(可用控件名或类型)。", - "name": "WIDGET_PROP_DEFAULT_FOCUSED_CHILD" - }, - { - "desc": "只读模式。", - "name": "WIDGET_PROP_READONLY" - }, - { - "desc": "是否可取消。", - "name": "WIDGET_PROP_CANCELABLE" - }, - { - "desc": "密码是否可见。", - "name": "WIDGET_PROP_PASSWORD_VISIBLE" - }, - { - "desc": "是否处于active状态。", - "name": "WIDGET_PROP_ACTIVE" - }, - { - "desc": "当前页。", - "name": "WIDGET_PROP_CURR_PAGE" - }, - { - "desc": "页面最大个数。", - "name": "WIDGET_PROP_PAGE_MAX_NUMBER" - }, - { - "desc": "是否为垂直模式。", - "name": "WIDGET_PROP_VERTICAL" - }, - { - "desc": "是否显示文本。", - "name": "WIDGET_PROP_SHOW_TEXT" - }, - { - "desc": "X方向的偏移。", - "name": "WIDGET_PROP_XOFFSET" - }, - { - "desc": "Y方向的偏移。", - "name": "WIDGET_PROP_YOFFSET" - }, - { - "desc": "垂直对齐模式。", - "name": "WIDGET_PROP_ALIGN_V" - }, - { - "desc": "水平对齐模式。", - "name": "WIDGET_PROP_ALIGN_H" - }, - { - "desc": "是否自动播放或指定播放的时间。", - "name": "WIDGET_PROP_AUTO_PLAY" - }, - { - "desc": "是否循环播放或循环播放的次数。", - "name": "WIDGET_PROP_LOOP" - }, - { - "desc": "是否启用自动更正功能。", - "name": "WIDGET_PROP_AUTO_FIX" - }, - { - "desc": "编辑器在获得焦点时是否不选中文本。", - "name": "WIDGET_PROP_SELECT_NONE_WHEN_FOCUSED" - }, - { - "desc": "编辑器在获得焦点时是否打开输入法。", - "name": "WIDGET_PROP_OPEN_IM_WHEN_FOCUSED" - }, - { - "desc": "编辑器在失去焦点时是否关闭输入法。", - "name": "WIDGET_PROP_CLOSE_IM_WHEN_BLURED" - }, - { - "desc": "X最小值。", - "name": "WIDGET_PROP_X_MIN" - }, - { - "desc": "X最大值。", - "name": "WIDGET_PROP_X_MAX" - }, - { - "desc": "Y最小值。", - "name": "WIDGET_PROP_Y_MIN" - }, - { - "desc": "Y最大值。", - "name": "WIDGET_PROP_Y_MAX" - }, - { - "desc": "最大值。", - "name": "WIDGET_PROP_MAX" - }, - { - "desc": "让窗口管理器直接把按键发给自己。", - "name": "WIDGET_PROP_GRAB_KEYS" - }, - { - "desc": "行数或每行的高度。", - "name": "WIDGET_PROP_ROW" - }, - { - "desc": "控件状态。", - "name": "WIDGET_PROP_STATE_FOR_STYLE" - }, - { - "desc": "窗口主题名称。", - "name": "WIDGET_PROP_THEME" - }, - { - "desc": "window stage", - "name": "WIDGET_PROP_STAGE" - }, - { - "desc": "图片管理器。", - "name": "WIDGET_PROP_IMAGE_MANAGER" - }, - { - "desc": "资源管理器。", - "name": "WIDGET_PROP_ASSETS_MANAGER" - }, - { - "desc": "locale_info。", - "name": "WIDGET_PROP_LOCALE_INFO" - }, - { - "desc": "字体管理器。", - "name": "WIDGET_PROP_FONT_MANAGER" - }, - { - "desc": "窗口的主题对象。", - "name": "WIDGET_PROP_THEME_OBJ" - }, - { - "desc": "缺省的主题对象。", - "name": "WIDGET_PROP_DEFAULT_THEME_OBJ" - }, - { - "desc": "项的宽度。", - "name": "WIDGET_PROP_ITEM_WIDTH" - }, - { - "desc": "项的高度。", - "name": "WIDGET_PROP_ITEM_HEIGHT" - }, - { - "desc": "项的缺省高度。", - "name": "WIDGET_PROP_DEFAULT_ITEM_HEIGHT" - }, - { - "desc": "X方向是否可拖动。", - "name": "WIDGET_PROP_XSLIDABLE" - }, - { - "desc": "Y方向是否可拖动。", - "name": "WIDGET_PROP_YSLIDABLE" - }, - { - "desc": "重复次数。", - "name": "WIDGET_PROP_REPEAT" - }, - { - "desc": "触发长按事件的时间(ms)。", - "name": "WIDGET_PROP_LONG_PRESS_TIME" - }, - { - "desc": "是否启用长按。", - "name": "WIDGET_PROP_ENABLE_LONG_PRESS" - }, - { - "desc": "是否启用点击穿透。", - "name": "WIDGET_PROP_CLICK_THROUGH" - }, - { - "desc": "是否启用动画。", - "name": "WIDGET_PROP_ANIMATABLE" - }, - { - "desc": "是否自动隐藏滚动条。", - "name": "WIDGET_PROP_AUTO_HIDE_SCROLL_BAR" - }, - { - "desc": "图片名称。", - "name": "WIDGET_PROP_IMAGE" - }, - { - "desc": "显示格式。", - "name": "WIDGET_PROP_FORMAT" - }, - { - "desc": "图片绘制类型。", - "name": "WIDGET_PROP_DRAW_TYPE" - }, - { - "desc": "是否可选择。", - "name": "WIDGET_PROP_SELECTABLE" - }, - { - "desc": "是否可点击。", - "name": "WIDGET_PROP_CLICKABLE" - }, - { - "desc": "X方向缩放比例。", - "name": "WIDGET_PROP_SCALE_X" - }, - { - "desc": "Y方向缩放比例。", - "name": "WIDGET_PROP_SCALE_Y" - }, - { - "desc": "x锚点。", - "name": "WIDGET_PROP_ANCHOR_X" - }, - { - "desc": "y锚点。", - "name": "WIDGET_PROP_ANCHOR_Y" - }, - { - "desc": "选中角度(幅度)", - "name": "WIDGET_PROP_ROTATION" - }, - { - "desc": "紧凑模式。", - "name": "WIDGET_PROP_COMPACT" - }, - { - "desc": "是否支持滚动。", - "name": "WIDGET_PROP_SCROLLABLE" - }, - { - "desc": "图标名称。", - "name": "WIDGET_PROP_ICON" - }, - { - "desc": "选项集合。", - "name": "WIDGET_PROP_OPTIONS" - }, - { - "desc": "是否被选中。", - "name": "WIDGET_PROP_SELECTED" - }, - { - "desc": "是否被勾选。", - "name": "WIDGET_PROP_CHECKED" - }, - { - "desc": "active状态下的图标。", - "name": "WIDGET_PROP_ACTIVE_ICON" - }, - { - "desc": "动态加载UI名字。", - "name": "WIDGET_PROP_LOAD_UI" - }, - { - "desc": "要打开窗口的名称。", - "name": "WIDGET_PROP_OPEN_WINDOW" - }, - { - "desc": "被选中项的索引。", - "name": "WIDGET_PROP_SELECTED_INDEX" - }, - { - "desc": "点击窗口时关闭窗口。", - "name": "WIDGET_PROP_CLOSE_WHEN_CLICK" - }, - { - "desc": "点击窗口外部时关闭窗口。", - "name": "WIDGET_PROP_CLOSE_WHEN_CLICK_OUTSIDE" - }, - { - "desc": "超时后关闭窗口。", - "name": "WIDGET_PROP_CLOSE_WHEN_TIMEOUT" - }, - { - "desc": "行间距。", - "name": "WIDGET_PROP_LINE_GAP" - }, - { - "desc": "背景颜色(仅仅使用于color tile)。", - "name": "WIDGET_PROP_BG_COLOR" - }, - { - "desc": "边框颜色(仅仅使用于color tile)。", - "name": "WIDGET_PROP_BORDER_COLOR" - }, - { - "desc": "延迟时间(毫秒)", - "name": "WIDGET_PROP_DELAY" - }, - { - "desc": "是否为键盘。", - "name": "WIDGET_PROP_IS_KEYBOARD" - }, - { - "desc": "是否为焦点控件。", - "name": "WIDGET_PROP_FOCUSED" - }, - { - "desc": "(过时请用focused)。", - "name": "WIDGET_PROP_FOCUS" - }, - { - "desc": "是否支持焦点停留。", - "name": "WIDGET_PROP_FOCUSABLE" - }, - { - "desc": "是否支持焦点状态(如果希望style支持焦点状态,但有不希望焦点停留,可用本属性)。", - "name": "WIDGET_PROP_WITH_FOCUS_STATE" - }, - { - "desc": "将焦点移到前一个的键值。", - "name": "WIDGET_PROP_MOVE_FOCUS_PREV_KEY" - }, - { - "desc": "将焦点移到后一个的键值。", - "name": "WIDGET_PROP_MOVE_FOCUS_NEXT_KEY" - }, - { - "desc": "将焦点向上移动的键值。", - "name": "WIDGET_PROP_MOVE_FOCUS_UP_KEY" - }, - { - "desc": "将焦点向下移动的键值。", - "name": "WIDGET_PROP_MOVE_FOCUS_DOWN_KEY" - }, - { - "desc": "将焦点向左移动的键值。", - "name": "WIDGET_PROP_MOVE_FOCUS_LEFT_KEY" - }, - { - "desc": "将焦点向右移动的键值。", - "name": "WIDGET_PROP_MOVE_FOCUS_RIGHT_KEY" - } - ], - "header": "base/widget_consts.h", - "name": "widget_prop_t", - "prefix": "WIDGET_PROP_", - "annotation": { - "scriptable": true, - "string": true - }, - "level": 1 - }, - { - "type": "enum", - "desc": "控件的类型。", - "consts": [ - { - "desc": "无特殊类型。", - "name": "WIDGET_TYPE_NONE" - }, - { - "desc": "窗口管理器。", - "name": "WIDGET_TYPE_WINDOW_MANAGER" - }, - { - "desc": "普通窗口。", - "name": "WIDGET_TYPE_NORMAL_WINDOW" - }, - { - "desc": "overlay窗口。", - "name": "WIDGET_TYPE_OVERLAY" - }, - { - "desc": "工具条。", - "name": "WIDGET_TYPE_TOOL_BAR" - }, - { - "desc": "对话框。", - "name": "WIDGET_TYPE_DIALOG" - }, - { - "desc": "弹出窗口。", - "name": "WIDGET_TYPE_POPUP" - }, - { - "desc": "system bar window", - "name": "WIDGET_TYPE_SYSTEM_BAR" - }, - { - "desc": "system bar window ato bottom", - "name": "WIDGET_TYPE_SYSTEM_BAR_BOTTOM" - }, - { - "desc": "精灵窗口。", - "name": "WIDGET_TYPE_SPRITE" - }, - { - "desc": "键盘窗口。", - "name": "WIDGET_TYPE_KEYBOARD" - }, - { - "desc": "拖放状态窗口。", - "name": "WIDGET_TYPE_DND" - }, - { - "desc": "文本控件。", - "name": "WIDGET_TYPE_LABEL" - }, - { - "desc": "按钮控件。", - "name": "WIDGET_TYPE_BUTTON" - }, - { - "desc": "图片控件。", - "name": "WIDGET_TYPE_IMAGE" - }, - { - "desc": "文本编辑控件。", - "name": "WIDGET_TYPE_EDIT" - }, - { - "desc": "进度条控件。", - "name": "WIDGET_TYPE_PROGRESS_BAR" - }, - { - "desc": "分组控件。", - "name": "WIDGET_TYPE_GROUP_BOX" - }, - { - "desc": "多选按钮控件。", - "name": "WIDGET_TYPE_CHECK_BUTTON" - }, - { - "desc": "单选按钮控件。", - "name": "WIDGET_TYPE_RADIO_BUTTON" - }, - { - "desc": "对话框标题。", - "name": "WIDGET_TYPE_DIALOG_TITLE" - }, - { - "desc": "对话框客户区域。", - "name": "WIDGET_TYPE_DIALOG_CLIENT" - }, - { - "desc": "滑块控件。", - "name": "WIDGET_TYPE_SLIDER" - }, - { - "desc": "视图控件。", - "name": "WIDGET_TYPE_VIEW" - }, - { - "desc": "下拉选择框控件。", - "name": "WIDGET_TYPE_COMBO_BOX" - }, - { - "desc": "下拉选择框的列表项控件。", - "name": "WIDGET_TYPE_COMBO_BOX_ITEM" - }, - { - "desc": "滑动视图控件。", - "name": "WIDGET_TYPE_SLIDE_VIEW" - }, - { - "desc": "滑动视图的指示器控件。", - "name": "WIDGET_TYPE_SLIDE_INDICATOR" - }, - { - "desc": "滑动视图的指示器控件(圆弧显示)。", - "name": "WIDGET_TYPE_SLIDE_INDICATOR_ARC" - }, - { - "desc": "多页控件。", - "name": "WIDGET_TYPE_PAGES" - }, - { - "desc": "标签按钮控件。", - "name": "WIDGET_TYPE_TAB_BUTTON" - }, - { - "desc": "标签控件。", - "name": "WIDGET_TYPE_TAB_CONTROL" - }, - { - "desc": "标签按钮分组控件。", - "name": "WIDGET_TYPE_TAB_BUTTON_GROUP" - }, - { - "desc": "按钮分组控件。", - "name": "WIDGET_TYPE_BUTTON_GROUP" - }, - { - "desc": "候选字控件。", - "name": "WIDGET_TYPE_CANDIDATES" - }, - { - "desc": "数值编辑控件。", - "name": "WIDGET_TYPE_SPIN_BOX" - }, - { - "desc": "拖动块控件。", - "name": "WIDGET_TYPE_DRAGGER" - }, - { - "desc": "滚动条控件。", - "name": "WIDGET_TYPE_SCROLL_BAR" - }, - { - "desc": "桌面版滚动条控件。", - "name": "WIDGET_TYPE_SCROLL_BAR_DESKTOP" - }, - { - "desc": "移动版滚动条控件。", - "name": "WIDGET_TYPE_SCROLL_BAR_MOBILE" - }, - { - "desc": "滚动视图控件。", - "name": "WIDGET_TYPE_SCROLL_VIEW" - }, - { - "desc": "列表视图控件。", - "name": "WIDGET_TYPE_LIST_VIEW" - }, - { - "desc": "水平列表视图控件。", - "name": "WIDGET_TYPE_LIST_VIEW_H" - }, - { - "desc": "列表项控件。", - "name": "WIDGET_TYPE_LIST_ITEM" - }, - { - "desc": "颜色选择器控件。", - "name": "WIDGET_TYPE_COLOR_PICKER" - }, - { - "desc": "颜色选择器组件控件。", - "name": "WIDGET_TYPE_COLOR_COMPONENT" - }, - { - "desc": "颜色块控件。", - "name": "WIDGET_TYPE_COLOR_TILE" - }, - { - "desc": "裁剪控件。", - "name": "WIDGET_TYPE_CLIP_VIEW" - }, - { - "desc": "富文本控件。", - "name": "WIDGET_TYPE_RICH_TEXT" - }, - { - "desc": "AppBar控件。", - "name": "WIDGET_TYPE_APP_BAR" - }, - { - "desc": "网格控件。", - "name": "WIDGET_TYPE_GRID" - }, - { - "desc": "网格项目控件。", - "name": "WIDGET_TYPE_GRID_ITEM" - }, - { - "desc": "行控件。", - "name": "WIDGET_TYPE_ROW" - }, - { - "desc": "列控件。", - "name": "WIDGET_TYPE_COLUMN" - }, - { - "desc": "电阻屏校准窗口。", - "name": "WIDGET_TYPE_CALIBRATION_WIN" - } - ], - "header": "base/widget_consts.h", - "name": "widget_type_t", - "prefix": "WIDGET_TYPE_", - "annotation": { - "scriptable": true, - "string": true - }, - "level": 1 - }, - { - "type": "enum", - "desc": "窗口的生命周期常量定义。", - "consts": [ - { - "desc": "初始状态。", - "name": "WINDOW_STAGE_NONE" - }, - { - "desc": "创建完成。", - "name": "WINDOW_STAGE_CREATED" - }, - { - "desc": "窗口已经打开(窗口打开动画完成后)", - "name": "WINDOW_STAGE_OPENED" - }, - { - "desc": "窗口已关闭。", - "name": "WINDOW_STAGE_CLOSED" - }, - { - "desc": "窗口挂起状态。", - "name": "WINDOW_STAGE_SUSPEND" - } - ], - "header": "base/widget_consts.h", - "name": "window_stage_t", - "prefix": "WINDOW_STAGE_", - "annotation": { - "scriptable": true - }, - "level": 1 - }, - { - "type": "enum", - "desc": "窗口的closable常量定义。", - "consts": [ - { - "desc": "窗口可关闭。", - "name": "WINDOW_CLOSABLE_YES" - }, - { - "desc": "窗口不可关闭。", - "name": "WINDOW_CLOSABLE_NO" - }, - { - "desc": "窗口需要确认后才能关闭。", - "name": "WINDOW_CLOSABLE_CONFIRM" - } - ], - "header": "base/widget_consts.h", - "name": "window_closable_t", - "prefix": "WINDOW_CLOSABLE_", - "annotation": { - "scriptable": true - }, - "level": 1 - }, - { - "type": "enum", - "desc": "控件状态常量定义。\n\n这里指定常用的状态值,扩展控件可以在自己的头文件中定义私有的状态。", - "consts": [ - { - "desc": "无效状态。", - "name": "WIDGET_STATE_NONE" - }, - { - "desc": "正常状态。", - "name": "WIDGET_STATE_NORMAL" - }, - { - "desc": "内容被修改的状态。", - "name": "WIDGET_STATE_CHANGED" - }, - { - "desc": "指针按下状态。", - "name": "WIDGET_STATE_PRESSED" - }, - { - "desc": "指针悬浮状态。", - "name": "WIDGET_STATE_OVER" - }, - { - "desc": "禁用状态。", - "name": "WIDGET_STATE_DISABLE" - }, - { - "desc": "聚焦状态。", - "name": "WIDGET_STATE_FOCUSED" - }, - { - "desc": "勾选状态。", - "name": "WIDGET_STATE_CHECKED" - }, - { - "desc": "没勾选状态。", - "name": "WIDGET_STATE_UNCHECKED" - }, - { - "desc": "编辑器无内容状态。", - "name": "WIDGET_STATE_EMPTY" - }, - { - "desc": "编辑器无内容同时聚焦的状态。", - "name": "WIDGET_STATE_EMPTY_FOCUS" - }, - { - "desc": "输入错误状态。", - "name": "WIDGET_STATE_ERROR" - }, - { - "desc": "选中状态。", - "name": "WIDGET_STATE_SELECTED" - }, - { - "desc": "正常状态(选中项)。", - "name": "WIDGET_STATE_NORMAL_OF_CHECKED" - }, - { - "desc": "指针按下状态(选中项)。", - "name": "WIDGET_STATE_PRESSED_OF_CHECKED" - }, - { - "desc": "指针悬浮状态(选中项)。", - "name": "WIDGET_STATE_OVER_OF_CHECKED" - }, - { - "desc": "禁用状态(选中项)。", - "name": "WIDGET_STATE_DISABLE_OF_CHECKED" - }, - { - "desc": "焦点状态(选中项)。", - "name": "WIDGET_STATE_FOCUSED_OF_CHECKED" - }, - { - "desc": "正常状态(当前项)。", - "name": "WIDGET_STATE_NORMAL_OF_ACTIVE" - }, - { - "desc": "指针按下状态(当前项)。", - "name": "WIDGET_STATE_PRESSED_OF_ACTIVE" - }, - { - "desc": "指针悬浮状态(当前项)。", - "name": "WIDGET_STATE_OVER_OF_ACTIVE" - }, - { - "desc": "禁用状态(当前项)。", - "name": "WIDGET_STATE_DISABLE_OF_ACTIVE" - }, - { - "desc": "焦点状态(当前项)。", - "name": "WIDGET_STATE_FOCUSED_OF_ACTIVE" - } - ], - "header": "base/widget_consts.h", - "name": "widget_state_t", - "prefix": "WIDGET_STATE_", - "annotation": { - "scriptable": true, - "string": true - }, - "level": 1 - }, - { - "type": "enum", - "desc": "控件鼠标光标常量定义。", - "consts": [ - { - "desc": "默认光标。", - "name": "WIDGET_CURSOR_DEFAULT" - }, - { - "desc": "文本选择光标。", - "name": "WIDGET_CURSOR_EDIT" - }, - { - "desc": "手指光标。", - "name": "WIDGET_CURSOR_HAND" - }, - { - "desc": "等待光标。", - "name": "WIDGET_CURSOR_WAIT" - }, - { - "desc": "叉光标。", - "name": "WIDGET_CURSOR_CROSS" - }, - { - "desc": "Slashed circle or crossbones。", - "name": "WIDGET_CURSOR_NO" - }, - { - "desc": "Double arrow pointing northwest and southeast。", - "name": "WIDGET_CURSOR_SIZENWSE" - }, - { - "desc": "Double arrow pointing northeast and southwest。", - "name": "WIDGET_CURSOR_SIZENESW" - }, - { - "desc": "Double arrow pointing west and east。", - "name": "WIDGET_CURSOR_SIZEWE" - }, - { - "desc": "Double arrow pointing north and south。", - "name": "WIDGET_CURSOR_SIZENS" - }, - { - "desc": "Four pointed arrow pointing north, south, east, and west。", - "name": "WIDGET_CURSOR_SIZEALL" - } - ], - "header": "base/widget_consts.h", - "name": "widget_cursor_t", - "prefix": "WIDGET_", - "annotation": { - "scriptable": true, - "string": true - }, - "level": 1 - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件。" - }, - { - "type": "const rect_t*", - "name": "rect", - "desc": "无效化区域。" - } - ], - "annotation": { - "global": true - }, - "desc": "awtk默认的invalidate接口。", - "name": "widget_invalidate_default", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - }, - "type": "method", - "header": "base/widget_vtable.h", - "level": 1 - }, - { - "params": [], - "annotation": { - "global": true - }, - "desc": "", - "name": "widget_on_event_default", - "type": "method", - "header": "base/widget_vtable.h", - "level": 1 - }, - { - "params": [], - "annotation": { - "global": true - }, - "desc": "", - "name": "widget_on_paint_self_default", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - }, - "type": "method", - "header": "base/widget_vtable.h", - "level": 1 - }, - { - "params": [], - "annotation": { - "global": true - }, - "desc": "", - "name": "widget_on_paint_children_default", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - }, - "type": "method", - "header": "base/widget_vtable.h", - "level": 1 - }, - { - "params": [], - "annotation": { - "global": true - }, - "desc": "", - "name": "widget_on_keydown_default", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - }, - "type": "method", - "header": "base/widget_vtable.h", - "level": 1 - }, - { - "params": [], - "annotation": { - "global": true - }, - "desc": "", - "name": "widget_on_keyup_default", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - }, - "type": "method", - "header": "base/widget_vtable.h", - "level": 1 - }, - { - "params": [], - "annotation": { - "global": true - }, - "desc": "", - "name": "widget_on_pointer_down_default", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - }, - "type": "method", - "header": "base/widget_vtable.h", - "level": 1 - }, - { - "params": [], - "annotation": { - "global": true - }, - "desc": "", - "name": "widget_on_pointer_move_default", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - }, - "type": "method", - "header": "base/widget_vtable.h", - "level": 1 - }, - { - "params": [], - "annotation": { - "global": true - }, - "desc": "", - "name": "widget_on_pointer_up_default", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - }, - "type": "method", - "header": "base/widget_vtable.h", - "level": 1 - }, - { - "params": [], - "annotation": { - "global": true - }, - "desc": "", - "name": "widget_on_copy_default", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - }, - "type": "method", - "header": "base/widget_vtable.h", - "level": 1 - }, - { - "params": [], - "annotation": { - "global": true - }, - "desc": "", - "name": "widget_get_prop_default", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - }, - "type": "method", - "header": "base/widget_vtable.h", - "level": 1 - }, - { - "params": [], - "annotation": { - "global": true - }, - "desc": "", - "name": "widget_set_prop_default", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - }, - "type": "method", - "header": "base/widget_vtable.h", - "level": 1 - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件。" - }, - { - "type": "xy_t", - "name": "x", - "desc": "坐标。" - }, - { - "type": "xy_t", - "name": "y", - "desc": "坐标。" - } - ], - "annotation": { - "global": true - }, - "desc": "awtk默认的find_target接口。", - "name": "widget_find_target_default", - "return": { - "type": "widget_t*", - "desc": "返回响应的控件。" - }, - "type": "method", - "header": "base/widget_vtable.h", - "level": 1 - }, - { - "params": [], - "annotation": { - "global": true - }, - "desc": "", - "name": "widget_on_paint_null", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - }, - "type": "method", - "header": "base/widget_vtable.h", - "level": 1 - }, - { - "type": "class", - "methods": [ - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取子控件的个数。", - "name": "widget_count_children", - "return": { - "type": "int32_t", - "desc": "子控件的个数。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "int32_t", - "name": "index", - "desc": "索引。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取指定索引的子控件。", - "name": "widget_get_child", - "return": { - "type": "widget_t*", - "desc": "子控件。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取原生窗口对象。", - "name": "widget_get_native_window", - "return": { - "type": "native_window_t*", - "desc": "原生窗口对象。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取控件在父控件中的索引编号。", - "name": "widget_index_of", - "return": { - "type": "int32_t", - "desc": "在父控件中的索引编号。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "widget对象。" - } - ], - "annotation": { - "deconstructor": true, - "scriptable": true - }, - "desc": "关闭控件所在的窗口。", - "name": "widget_close_window", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "xy_t", - "name": "x", - "desc": "x坐标" - }, - { - "type": "xy_t", - "name": "y", - "desc": "y坐标" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "移动控件。", - "name": "widget_move", - "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": "widget_resize", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "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": { - "scriptable": true - }, - "desc": "移动控件并调整控件的大小。", - "name": "widget_move_resize", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "int32_t", - "name": "value", - "desc": "值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置控件的值。\n只是对widget\\_set\\_prop的包装,值的意义由子类控件决定。", - "name": "widget_set_value", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "int32_t", - "name": "value", - "desc": "值。" - }, - { - "type": "uint32_t", - "name": "duration", - "desc": "动画持续时间(毫秒)。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置控件的值(以动画形式变化到指定的值)。\n只是对widget\\_set\\_prop的包装,值的意义由子类控件决定。", - "name": "widget_animate_value_to", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "int32_t", - "name": "delta", - "desc": "增量。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "增加控件的值。\n只是对widget\\_set\\_prop的包装,值的意义由子类控件决定。", - "name": "widget_add_value", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const wchar_t*", - "name": "text", - "desc": "文本。" - } - ], - "annotation": {}, - "desc": "设置控件的文本。\n只是对widget\\_set\\_prop的包装,文本的意义由子类控件决定。", - "name": "widget_set_text", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "style", - "desc": "style的名称。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "启用指定的style。", - "name": "widget_use_style", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "text", - "desc": "文本。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置控件的文本。\n只是对widget\\_set\\_prop的包装,文本的意义由子类控件决定。", - "name": "widget_set_text_utf8", - "alias": "set_text", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "char*", - "name": "text", - "desc": "用于返回文本。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "text内存长度。" - } - ], - "annotation": {}, - "desc": "获取控件的文本。\n只是对widget\\_get\\_prop的包装,文本的意义由子类控件决定。", - "name": "widget_get_text_utf8", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "子控件的名称。" - }, - { - "type": "const char*", - "name": "text", - "desc": "文本。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置子控件的文本。\n只是对widget\\_set\\_prop的包装,文本的意义由子类控件决定。", - "name": "widget_set_child_text_utf8", - "alias": "set_child_text", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "子控件的名称。" - }, - { - "type": "const char*", - "name": "format", - "desc": "格式字符串(如:\"%2.2lf\")。" - }, - { - "type": "double", - "name": "value", - "desc": "浮点数值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "用一个浮点数去设置子控件的文本。\n只是对widget\\_set\\_prop的包装,文本的意义由子类控件决定。", - "name": "widget_set_child_text_with_double", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "子控件的名称。" - }, - { - "type": "const char*", - "name": "format", - "desc": "格式字符串(如:\"%d\")。" - }, - { - "type": "int", - "name": "value", - "desc": "值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "用一个整数去设置子控件的文本。\n只是对widget\\_set\\_prop的包装,文本的意义由子类控件决定。", - "name": "widget_set_child_text_with_int", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "text", - "desc": "文本。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取翻译之后的文本,然后调用widget_set_text。", - "name": "widget_set_tr_text", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取控件的值。只是对widget\\_get\\_prop的包装,值的意义由子类控件决定。", - "name": "widget_get_value", - "return": { - "type": "int32_t", - "desc": "返回值。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取控件的文本。\n只是对widget\\_get\\_prop的包装,文本的意义由子类控件决定。\n\n如果希望获取UTF8格式的文本,可以参考下面的代码:\n\n```c\nstr_t str;\nstr_init(&str, 0);\nstr_from_wstr(&str, widget_get_text(target));\nlog_debug(\"%s: %s\\n\", target->name, str.str);\nstr_reset(&str);\n```", - "name": "widget_get_text", - "return": { - "type": "const wchar_t*", - "desc": "返回文本。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "point_t*", - "name": "p", - "desc": "坐标点。" - } - ], - "annotation": {}, - "desc": "将屏幕坐标转换成控件内的本地坐标,即相对于控件左上角的坐标。", - "name": "widget_to_local", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "point_t*", - "name": "p", - "desc": "坐标点。" - } - ], - "annotation": {}, - "desc": "将控件内的本地坐标转换成全局坐标。", - "name": "widget_to_global", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "point_t*", - "name": "p", - "desc": "坐标点。" - } - ], - "annotation": {}, - "desc": "将控件内的本地坐标转换成屏幕上的坐标。", - "name": "widget_to_screen", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "名称。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置控件的名称。", - "name": "widget_set_name", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "主题的名称。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置theme的名称,用于动态切换主题。名称与当前主题名称相同,则重新加载全部资源。\n\n> 目前只支持带有文件系统的平台。", - "name": "widget_set_theme", - "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": "widget_set_pointer_cursor", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "animation", - "desc": "动画参数。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置控件的动画参数(仅用于在UI文件使用)。\n请参考[控件动画](https://github.com/zlgopen/awtk/blob/master/docs/widget_animator.md)", - "name": "widget_set_animation", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "animation", - "desc": "动画参数。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "创建动画。\n请参考[控件动画](https://github.com/zlgopen/awtk/blob/master/docs/widget_animator.md)\n\n* 除非指定auto_start=false,动画创建后自动启动。\n* 除非指定auto_destroy=false,动画播放完成后自动销毁。", - "name": "widget_create_animator", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "动画名称。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "播放动画。\n请参考[控件动画](https://github.com/zlgopen/awtk/blob/master/docs/widget_animator.md)\n\n* 1.widget为NULL时,播放所有名称为name的动画。\n* 2.name为NULL时,播放所有widget相关的动画。\n* 3.widget和name均为NULL,播放所有动画。", - "name": "widget_start_animator", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "动画名称。" - }, - { - "type": "float_t", - "name": "time_scale", - "desc": "时间倍率。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置动画的时间倍率,<0: 时间倒退,<1: 时间变慢,>1 时间变快。\n请参考[控件动画](https://github.com/zlgopen/awtk/blob/master/docs/widget_animator.md)\n\n* 1.widget为NULL时,设置所有名称为name的动画的时间倍率。\n* 2.name为NULL时,设置所有widget相关的动画的时间倍率。\n* 3.widget和name均为NULL,设置所有动画的时间倍率。", - "name": "widget_set_animator_time_scale", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "动画名称。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "暂停动画。\n请参考[控件动画](https://github.com/zlgopen/awtk/blob/master/docs/widget_animator.md)\n\n* 1.widget为NULL时,暂停所有名称为name的动画。\n* 2.name为NULL时,暂停所有widget相关的动画。\n* 3.widget和name均为NULL,暂停所有动画。", - "name": "widget_pause_animator", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "动画名称。" - } - ], - "annotation": {}, - "desc": "查找指定名称的动画。", - "name": "widget_find_animator", - "return": { - "type": "widget_animator_t*", - "desc": "成功返回动画对象,失败返回NULL。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "动画名称。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "停止动画(控件的相应属性回归原位)。\n请参考[控件动画](https://github.com/zlgopen/awtk/blob/master/docs/widget_animator.md)\n\n* 1.widget为NULL时,停止所有名称为name的动画。\n* 2.name为NULL时,停止所有widget相关的动画。\n* 3.widget和name均为NULL,停止所有动画。", - "name": "widget_stop_animator", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "动画名称。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "销毁动画。\n请参考[控件动画](https://github.com/zlgopen/awtk/blob/master/docs/widget_animator.md)\n\n* 1.widget为NULL时,销毁所有名称为name的动画。\n* 2.name为NULL时,销毁所有widget相关的动画。\n* 3.widget和name均为NULL,销毁所有动画。", - "name": "widget_destroy_animator", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "bool_t", - "name": "enable", - "desc": "是否可用性。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置控件的可用性。", - "name": "widget_set_enable", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "bool_t", - "name": "feedback", - "desc": "是否启用反馈。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置控件是否启用反馈。", - "name": "widget_set_feedback", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "bool_t", - "name": "auto_adjust_size", - "desc": "是否根据子控件和文本自动调整控件自身大小。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置控件是否根据子控件和文本自动调整控件自身大小。", - "name": "widget_set_auto_adjust_size", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "bool_t", - "name": "floating", - "desc": "是否启用floating布局。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置控件的floating标志。\n> floating的控件不受父控件的子控件布局参数的影响。", - "name": "widget_set_floating", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "bool_t", - "name": "focused", - "desc": "是否获得焦点。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置控件是否获得焦点。", - "name": "widget_set_focused", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "bool_t", - "name": "focusable", - "desc": "是否可获得焦点。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置控件是否可获得焦点。", - "name": "widget_set_focusable", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "state", - "desc": "状态(必须为真正的常量字符串,在widget的整个生命周期有效)。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置控件的状态。", - "name": "widget_set_state", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "uint8_t", - "name": "opacity", - "desc": "不透明度(取值0-255,0表示完全透明,255表示完全不透明)。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置控件的不透明度。\n\n>在嵌入式平台,半透明效果会使性能大幅下降,请谨慎使用。", - "name": "widget_set_opacity", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "uint16_t", - "name": "dirty_rect_tolerance", - "desc": "控件脏脏矩形超出控件本身大小的最大范。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置控件脏矩形超出控件本身大小的最大范围(一般不用指定)。", - "name": "widget_set_dirty_rect_tolerance", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "销毁全部子控件。", - "name": "widget_destroy_children", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "widget_t*", - "name": "child", - "desc": "子控件对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "加入一个子控件。", - "name": "widget_add_child", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "widget_t*", - "name": "child", - "desc": "子控件对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "移出指定的子控件(并不销毁)。", - "name": "widget_remove_child", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "uint32_t", - "name": "index", - "desc": "位置序数(大于等于总个数,则放到最后)。" - }, - { - "type": "widget_t*", - "name": "child", - "desc": "子控件对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "插入子控件到指定的位置。", - "name": "widget_insert_child", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "uint32_t", - "name": "index", - "desc": "位置序数(大于等于总个数,则放到最后)。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "调整控件在父控件中的位置序数。", - "name": "widget_restack", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "子控件的名称。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "查找指定名称的子控件(同widget_lookup(widget, name, FALSE))。", - "name": "widget_child", - "return": { - "type": "widget_t*", - "desc": "子控件或NULL。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "子控件的名称。" - }, - { - "type": "bool_t", - "name": "recursive", - "desc": "是否递归查找全部子控件。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "查找指定名称的子控件(返回第一个)。", - "name": "widget_lookup", - "return": { - "type": "widget_t*", - "desc": "子控件或NULL。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "type", - "desc": "子控件的名称。" - }, - { - "type": "bool_t", - "name": "recursive", - "desc": "是否递归查找全部子控件。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "查找指定类型的子控件(返回第一个)。", - "name": "widget_lookup_by_type", - "return": { - "type": "widget_t*", - "desc": "子控件或NULL。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "bool_t", - "name": "visible", - "desc": "是否可见。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置控件的可见性。", - "name": "widget_set_visible", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "bool_t", - "name": "visible", - "desc": "是否可见。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置控件的可见性(不触发repaint和relayout)。", - "name": "widget_set_visible_only", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "bool_t", - "name": "sensitive", - "desc": "是否接受用户事件。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置控件是否接受用户事件。", - "name": "widget_set_sensitive", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "event_type_t", - "name": "type", - "desc": "事件类型。" - }, - { - "type": "event_func_t", - "name": "on_event", - "desc": "事件处理函数。" - }, - { - "type": "void*", - "name": "ctx", - "desc": "事件处理函数上下文。" - } - ], - "annotation": { - "scriptable": "custom" - }, - "desc": "注册指定事件的处理函数。\n使用示例:\n\n```c\nwidget_t* ok = button_create(win, 10, 10, 80, 30);\nwidget_on(ok, EVT_CLICK, on_click, NULL);\n\n```", - "name": "widget_on", - "return": { - "type": "uint32_t", - "desc": "返回id,用于widget_off。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "event_type_t", - "name": "type", - "desc": "事件类型。" - }, - { - "type": "event_func_t", - "name": "on_event", - "desc": "事件处理函数。" - }, - { - "type": "void*", - "name": "ctx", - "desc": "事件处理函数上下文。" - }, - { - "type": "uint32_t", - "name": "tag", - "desc": "tag。" - } - ], - "annotation": {}, - "desc": "注册指定tag的事件处理函数。\n\n> 注册时指定一个tag,可用widget\\_off\\_by\\_tag注销相同tag的事件处理函数。", - "name": "widget_on_with_tag", - "return": { - "type": "uint32_t", - "desc": "返回id,用于widget_off。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "uint32_t", - "name": "id", - "desc": "widget_on返回的ID。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "注销指定事件的处理函数。", - "name": "widget_off", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "子控件的名称。" - }, - { - "type": "event_type_t", - "name": "type", - "desc": "事件类型。" - }, - { - "type": "event_func_t", - "name": "on_event", - "desc": "事件处理函数。" - }, - { - "type": "void*", - "name": "ctx", - "desc": "事件处理函数上下文。" - } - ], - "annotation": {}, - "desc": "为指定名称的子控件注册指定事件的处理函数。\n递归查找指定名称的子控件,然后为其注册指定事件的处理函数。", - "name": "widget_child_on", - "return": { - "type": "uint32_t", - "desc": "返回id,用于widget_off。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "event_type_t", - "name": "type", - "desc": "事件类型。" - }, - { - "type": "event_func_t", - "name": "on_event", - "desc": "事件处理函数。" - }, - { - "type": "void*", - "name": "ctx", - "desc": "事件处理函数上下文。" - } - ], - "annotation": {}, - "desc": "注销指定函数的事件处理函数。", - "name": "widget_off_by_func", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "void*", - "name": "ctx", - "desc": "事件处理函数上下文。" - } - ], - "annotation": {}, - "desc": "注销指定ctx的事件处理函数。", - "name": "widget_off_by_ctx", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "uint32_t", - "name": "tag", - "desc": "tag。" - } - ], - "annotation": {}, - "desc": "注销指定tag的事件处理函数。", - "name": "widget_off_by_tag", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const rect_t*", - "name": "r", - "desc": "矩形对象(widget本地坐标)。" - } - ], - "annotation": {}, - "desc": "请求重绘指定的区域,如果widget->dirty已经为TRUE,直接返回。", - "name": "widget_invalidate", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const rect_t*", - "name": "r", - "desc": "矩形对象(widget本地坐标)。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "请求强制重绘控件。", - "name": "widget_invalidate_force", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "canvas_t*", - "name": "c", - "desc": "画布对象。" - } - ], - "annotation": {}, - "desc": "绘制控件到一个canvas上。", - "name": "widget_paint", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "canvas_t*", - "name": "c", - "desc": "画布对象。" - }, - { - "type": "const wchar_t*", - "name": "str", - "desc": "文本。" - }, - { - "type": "uint32_t", - "name": "size", - "desc": "文本长度。" - }, - { - "type": "const rect_t*", - "name": "r", - "desc": "矩形区域。" - }, - { - "type": "bool_t", - "name": "ellipses", - "desc": "宽度不够时是否显示省略号。" - } - ], - "annotation": {}, - "desc": "在canvas绘制一行文本。", - "name": "widget_draw_text_in_rect", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "event_t*", - "name": "e", - "desc": "事件。" - } - ], - "annotation": {}, - "desc": "分发一个事件。", - "name": "widget_dispatch", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "uint32_t", - "name": "type", - "desc": "事件类型。" - } - ], - "annotation": {}, - "desc": "分发一个简单事件。", - "name": "widget_dispatch_simple_event", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "event_t*", - "name": "e", - "desc": "事件。" - } - ], - "annotation": {}, - "desc": "分发一个事件控件本身及所有子控件。", - "name": "widget_dispatch_recursive", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "属性的名称。" - }, - { - "type": "value_t*", - "name": "v", - "desc": "返回属性的值。" - } - ], - "annotation": {}, - "desc": "获取控件指定属性的值。", - "name": "widget_get_prop", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "属性的名称。" - }, - { - "type": "value_t*", - "name": "v", - "desc": "返回属性的缺省值。" - } - ], - "annotation": {}, - "desc": "获取控件指定属性的缺省值(在持久化控件时,无需保存缺省值)。", - "name": "widget_get_prop_default_value", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "属性的名称。" - }, - { - "type": "value_t*", - "name": "v", - "desc": "属性的值。" - } - ], - "annotation": {}, - "desc": "设置控件指定属性的值。", - "name": "widget_set_prop", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "属性的名称。" - }, - { - "type": "const char*", - "name": "v", - "desc": "属性的值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置字符串格式的属性。", - "name": "widget_set_prop_str", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "属性的名称。" - }, - { - "type": "const char*", - "name": "defval", - "desc": "缺省值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取字符串格式的属性。", - "name": "widget_get_prop_str", - "return": { - "type": "const char*", - "desc": "返回属性的值。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "属性的名称。" - }, - { - "type": "void*", - "name": "v", - "desc": "属性的值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置指针格式的属性。", - "name": "widget_set_prop_pointer", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "属性的名称。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取指针格式的属性。", - "name": "widget_get_prop_pointer", - "return": { - "type": "void*", - "desc": "返回属性的值。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "属性的名称。" - }, - { - "type": "int32_t", - "name": "v", - "desc": "属性的值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置整数格式的属性。", - "name": "widget_set_prop_int", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "属性的名称。" - }, - { - "type": "int32_t", - "name": "defval", - "desc": "缺省值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取整数格式的属性。", - "name": "widget_get_prop_int", - "return": { - "type": "int32_t", - "desc": "返回属性的值。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "属性的名称。" - }, - { - "type": "bool_t", - "name": "v", - "desc": "属性的值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置布尔格式的属性。", - "name": "widget_set_prop_bool", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "属性的名称。" - }, - { - "type": "bool_t", - "name": "defval", - "desc": "缺省值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取布尔格式的属性。", - "name": "widget_get_prop_bool", - "return": { - "type": "bool_t", - "desc": "返回属性的值。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "判断当前控件所在的窗口是否已经打开。", - "name": "widget_is_window_opened", - "return": { - "type": "bool_t", - "desc": "返回当前控件所在的窗口是否已经打开。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "widget_t*", - "name": "child", - "desc": "控件对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "判断当前控件是否是指定控件的父控件(包括非直系)。", - "name": "widget_is_parent_of", - "return": { - "type": "bool_t", - "desc": "返回TRUE表示是,否则表示不是。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "widget_t*", - "name": "child", - "desc": "控件对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "判断当前控件是否是指定控件的直系父控件。", - "name": "widget_is_direct_parent_of", - "return": { - "type": "bool_t", - "desc": "返回TRUE表示是,否则表示不是。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "判断当前控件是否是窗口。", - "name": "widget_is_window", - "return": { - "type": "bool_t", - "desc": "返回当前控件是否是窗口。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "widget对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "检查控件是否是system bar类型。", - "name": "widget_is_system_bar", - "return": { - "type": "bool_t", - "desc": "返回FALSE表示不是,否则表示是。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "widget对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "检查控件是否是普通窗口类型。", - "name": "widget_is_normal_window", - "return": { - "type": "bool_t", - "desc": "返回FALSE表示不是,否则表示是。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "widget对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "检查控件是否是对话框类型。", - "name": "widget_is_dialog", - "return": { - "type": "bool_t", - "desc": "返回FALSE表示不是,否则表示是。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "widget对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "检查控件是否是弹出窗口类型。", - "name": "widget_is_popup", - "return": { - "type": "bool_t", - "desc": "返回FALSE表示不是,否则表示是。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "widget对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "检查控件是否是overlay窗口类型。", - "name": "widget_is_overlay", - "return": { - "type": "bool_t", - "desc": "返回FALSE表示不是,否则表示是。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "widget对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "检查控件弹出窗口控件是否已经打开了(而非挂起状态)。", - "name": "widget_is_opened_popup", - "return": { - "type": "bool_t", - "desc": "返回FALSE表示不是,否则表示是。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "判断当前控件是否是keyboard。\n\n> keyboard收到pointer事件时,不会让当前控件失去焦点。\n\n在自定义软键盘时,将所有按钮放到一个容器当中,并设置为is_keyboard。\n\n```c\nwidget_set_prop_bool(group, WIDGET_PROP_IS_KEYBOARD, TRUE);\n```", - "name": "widget_is_keyboard", - "return": { - "type": "bool_t", - "desc": "返回FALSE表示不是,否则表示是。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "判断当前控件是否是设计窗口。", - "name": "widget_is_designing_window", - "return": { - "type": "bool_t", - "desc": "返回当前控件是否是设计窗口。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "判断当前控件是否是窗口管理器。", - "name": "widget_is_window_manager", - "return": { - "type": "bool_t", - "desc": "返回当前控件是否是窗口管理器。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "widget_t*", - "name": "child", - "desc": "子控件对象。" - } - ], - "annotation": {}, - "desc": "让指定子控件抓住事件。\n控件抓住之后,事件直接分发给该控件。", - "name": "widget_grab", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "widget_t*", - "name": "child", - "desc": "子控件对象。" - } - ], - "annotation": {}, - "desc": "让指定子控件放弃抓住事件。", - "name": "widget_ungrab", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "tk_visit_t", - "name": "visit", - "desc": "遍历的回调函数。" - }, - { - "type": "void*", - "name": "ctx", - "desc": "回调函数的上下文。" - } - ], - "annotation": { - "scriptable": "custom" - }, - "desc": "遍历当前控件及子控件。", - "name": "widget_foreach", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取当前控件所在的窗口。", - "name": "widget_get_window", - "return": { - "type": "widget_t*", - "desc": "窗口对象。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取当前的窗口管理器。", - "name": "widget_get_window_manager", - "return": { - "type": "widget_t*", - "desc": "窗口管理器对象。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取当前控件的类型名称。", - "name": "widget_get_type", - "return": { - "type": "const char*", - "desc": "返回类型名。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "widget_t*", - "name": "parent", - "desc": "clone新控件的parent对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "clone。", - "name": "widget_clone", - "return": { - "type": "widget_t*", - "desc": "返回clone的对象。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "widget_t*", - "name": "other", - "desc": "要比较的控件对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "判断两个widget是否相同。", - "name": "widget_equal", - "return": { - "type": "bool_t", - "desc": "返回TRUE表示相同,否则表示不同。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "timer_func_t", - "name": "on_timer", - "desc": "timer回调函数。" - }, - { - "type": "uint32_t", - "name": "duration_ms", - "desc": "时间。" - } - ], - "annotation": {}, - "desc": "创建定时器。\n该定时器在控件销毁时自动销毁,**timer\\_info\\_t**的ctx为widget。\n如果定时器的生命周期与控件无关,请直接调用**timer_add**,以避免不必要的内存开销。\n\n使用示例:\n\n```c\nstatic ret_t digit_clock_on_timer(const timer_info_t* info) {\nwidget_t* widget = WIDGET(info->ctx);\n\nreturn RET_REPEAT;\n}\n...\nwidget_add_timer(widget, digit_clock_on_timer, 1000);\n\n```", - "name": "widget_add_timer", - "return": { - "type": "uint32_t", - "desc": "返回timer的ID,TK_INVALID_ID表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "uint32_t", - "name": "timer_id", - "desc": "timerID。" - } - ], - "annotation": {}, - "desc": "删除指定的timer。", - "name": "widget_remove_timer", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "idle_func_t", - "name": "on_idle", - "desc": "idle回调函数。" - } - ], - "annotation": {}, - "desc": "创建idle。\n该idle在控件销毁时自动销毁,**idle\\_info\\_t**的ctx为widget。\n如果idle的生命周期与控件无关,请直接调用**idle_add**,以避免不必要的内存开销。", - "name": "widget_add_idle", - "return": { - "type": "uint32_t", - "desc": "返回idle的ID,TK_INVALID_ID表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "name", - "desc": "图片名(不带扩展名)。" - }, - { - "type": "bitmap_t*", - "name": "bitmap", - "desc": "返回图片对象。" - } - ], - "annotation": {}, - "desc": "加载图片。\n返回的bitmap对象只在当前调用有效,请不保存对bitmap对象的引用。\n\n\n使用示例:\n\n```c\nbitmap_t bitmap;\nwidget_load_image(widget, \"myimage\", &bitmap);\n\n```", - "name": "widget_load_image", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "bitmap_t*", - "name": "bitmap", - "desc": "图片对象。" - } - ], - "annotation": {}, - "desc": "卸载图片。\n\n> 一般不需要调用,只有确认在图片不再需要时才调用本函数卸载。", - "name": "widget_unload_image", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "asset_type_t", - "name": "type", - "desc": "资源类型。" - }, - { - "type": "const char*", - "name": "name", - "desc": "资源名。" - } - ], - "annotation": {}, - "desc": "加载资源。\n\n使用示例:\n\n```c\nconst asset_info_t* asset = widget_load_asset(widget, ASSET_TYPE_IMAGE, \"mysvg\");\n...\nwidget_unload_asset(widget, asset);\n```", - "name": "widget_load_asset", - "return": { - "type": "const asset_info_t*", - "desc": "返回资源句柄。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const asset_info_t*", - "name": "asset", - "desc": "资源句柄。" - } - ], - "annotation": {}, - "desc": "卸载资源。\n\n使用示例:\n\n```c\nconst asset_info_t* asset = widget_load_asset(widget, ASSET_TYPE_IMAGE, \"mysvg\");\n...\nwidget_unload_asset(widget, asset);\n```", - "name": "widget_unload_asset", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "widget对象。" - } - ], - "annotation": { - "cast": true, - "scriptable": true - }, - "desc": "转换为widget对象(供脚本语言使用)。", - "name": "widget_cast", - "return": { - "type": "widget_t*", - "desc": "widget对象。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "从父控件中移除控件,并调用unref函数销毁控件。\n\n> 一般无需直接调用,关闭窗口时,自动销毁相关控件。", - "name": "widget_destroy", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "从父控件中移除控件,并调用unref函数销毁控件。\n\n> 一般无需直接调用,关闭窗口时,自动销毁相关控件。", - "name": "widget_destroy_async", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - } - ], - "annotation": {}, - "desc": "增加控件的引用计数。", - "name": "widget_ref", - "return": { - "type": "widget_t*", - "desc": "返回控件对象。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "减少控件的引用计数。引用计数为0时销毁控件。", - "name": "widget_unref", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "canvas_t*", - "name": "c", - "desc": "画布对象。" - }, - { - "type": "const char*", - "name": "icon", - "desc": "图标的名称。" - }, - { - "type": "wstr_t*", - "name": "text", - "desc": "文字。" - } - ], - "annotation": {}, - "desc": "帮助子控件实现自己的绘制函数。", - "name": "widget_paint_helper", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "canvas_t*", - "name": "c", - "desc": "画布对象。" - } - ], - "annotation": {}, - "desc": "根据控件的style绘制背景矩形。", - "name": "widget_draw_background", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "canvas_t*", - "name": "c", - "desc": "画布对象。" - }, - { - "type": "const rect_t*", - "name": "r", - "desc": "矩形区域。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "根据控件的style绘制边框矩形。", - "name": "widget_stroke_border_rect", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "canvas_t*", - "name": "c", - "desc": "画布对象。" - }, - { - "type": "const rect_t*", - "name": "r", - "desc": "矩形区域。" - }, - { - "type": "image_draw_type_t", - "name": "draw_type", - "desc": "图片缺省绘制方式。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "根据控件的style绘制背景矩形。", - "name": "widget_fill_bg_rect", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "canvas_t*", - "name": "c", - "desc": "画布对象。" - }, - { - "type": "const rect_t*", - "name": "r", - "desc": "矩形区域。" - }, - { - "type": "image_draw_type_t", - "name": "draw_type", - "desc": "图片缺省绘制方式。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "根据控件的style绘制前景矩形。", - "name": "widget_fill_fg_rect", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "canvas_t*", - "name": "c", - "desc": "画布对象。" - } - ], - "annotation": {}, - "desc": "从widget的style中取出字体名称、大小和颜色数据,设置到canvas中。", - "name": "widget_prepare_text_style", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "wchar_t*", - "name": "text", - "desc": "文本。" - } - ], - "annotation": {}, - "desc": "计算文本的宽度。\n字体由控件当前的状态和style决定。", - "name": "widget_measure_text", - "return": { - "type": "float_t", - "desc": "返回文本的宽度。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "event_t*", - "name": "e", - "desc": "事件对象。" - } - ], - "annotation": {}, - "desc": "递归分发事件到targe控件。", - "name": "widget_dispatch_event_to_target_recursive", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "xy_t", - "name": "x", - "desc": "x坐标" - }, - { - "type": "xy_t", - "name": "y", - "desc": "y坐标" - }, - { - "type": "bool_t", - "name": "is_local", - "desc": "TRUE表示是相对与控件左上角的坐标,否则表示全局坐标。" - } - ], - "annotation": {}, - "desc": "判断一个点是否在控件内。", - "name": "widget_is_point_in", - "return": { - "type": "bool_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "event_t*", - "name": "e", - "desc": "事件。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "递归的分发一个事件到所有target子控件。", - "name": "widget_dispatch_to_target", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "event_t*", - "name": "e", - "desc": "事件。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "递归的分发一个事件到所有key_target子控件。", - "name": "widget_dispatch_to_key_target", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "xy_t", - "name": "x", - "desc": "x坐标。" - }, - { - "type": "xy_t", - "name": "y", - "desc": "y坐标。" - } - ], - "annotation": {}, - "desc": "查找x/y坐标对应的子控件。", - "name": "widget_find_target", - "return": { - "type": "widget*", - "desc": "子控件或NULL。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - } - ], - "annotation": {}, - "desc": "语言改变后,重新翻译控件上的文本(包括子控件)。", - "name": "widget_re_translate_text", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "widget对象。" - }, - { - "type": "widget_t*", - "name": "parent", - "desc": "widget的父控件。" - }, - { - "type": "widget_vtable_t*", - "name": "vt", - "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": {}, - "desc": "初始化控件。仅在子类控件构造函数中使用。\n\n> 请用widget\\_create代替本函数。\n\n@depreated", - "name": "widget_init", - "return": { - "type": "widget_t*", - "desc": "widget对象本身。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "parent", - "desc": "widget的父控件。" - }, - { - "type": "widget_vtable_t*", - "name": "vt", - "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": {}, - "desc": "创建控件。仅在子类控件构造函数中使用。", - "name": "widget_create", - "return": { - "type": "widget_t*", - "desc": "widget对象本身。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "widget对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "让控件根据自己当前状态更新style。", - "name": "widget_update_style", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "widget对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "让控件及子控件根据自己当前状态更新style。", - "name": "widget_update_style_recursive", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "widget对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "递归的把父控件的key_target设置为自己。", - "name": "widget_set_as_key_target", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "widget对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "把焦点移动下一个控件。\n\n>widget必须是当前焦点控件。", - "name": "widget_focus_next", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "widget对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "把焦点移动前一个控件。\n\n>widget必须是当前焦点控件。", - "name": "widget_focus_prev", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "widget对象。" - }, - { - "type": "bool_t", - "name": "active", - "desc": "控件是否为当前项。" - }, - { - "type": "bool_t", - "name": "checked", - "desc": "控件是否为选中项。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "把控件的状态转成获取style选要的状态,一般只在子类中使用。", - "name": "widget_get_state_for_style", - "return": { - "type": "const char*", - "desc": "返回状态值。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "widget对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "布局当前控件及子控件。", - "name": "widget_layout", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - } - ], - "annotation": {}, - "desc": "layout子控件。", - "name": "widget_layout_children", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "params", - "desc": "布局参数。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置控件自己的布局参数。", - "name": "widget_set_self_layout", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "params", - "desc": "布局参数。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置子控件的布局参数。", - "name": "widget_set_children_layout", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "x", - "desc": "x参数。" - }, - { - "type": "const char*", - "name": "y", - "desc": "y参数。" - }, - { - "type": "const char*", - "name": "w", - "desc": "w参数。" - }, - { - "type": "const char*", - "name": "h", - "desc": "h参数。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置控件自己的布局(缺省布局器)参数(过时,请用widget\\_set\\_self\\_layout)。", - "name": "widget_set_self_layout_params", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "state_and_name", - "desc": "状态和名字,用英文的冒号分隔。" - }, - { - "type": "int32_t", - "name": "value", - "desc": "值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置整数类型的style。\n\n> * [state 的取值](https://github.com/zlgopen/awtk/blob/master/docs/manual/widget_state_t.md)\n> * [name 的取值](https://github.com/zlgopen/awtk/blob/master/docs/theme.md)", - "name": "widget_set_style_int", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "state_and_name", - "desc": "状态和名字,用英文的冒号分隔。" - }, - { - "type": "const char*", - "name": "value", - "desc": "值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置字符串类型的style。\n\n> * [state 的取值](https://github.com/zlgopen/awtk/blob/master/docs/manual/widget_state_t.md)\n> * [name 的取值](https://github.com/zlgopen/awtk/blob/master/docs/theme.md)", - "name": "widget_set_style_str", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "state_and_name", - "desc": "状态和名字,用英文的冒号分隔。" - }, - { - "type": "uint32_t", - "name": "value", - "desc": "值。颜色值一般用十六进制表示,每两个数字表示一个颜色通道,从高位到低位,依次是ABGR。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置颜色类型的style。\n\n> * [state 的取值](https://github.com/zlgopen/awtk/blob/master/docs/manual/widget_state_t.md)\n> * [name 的取值](https://github.com/zlgopen/awtk/blob/master/docs/theme.md)\n\n\n在下面这个例子中,R=0x11 G=0x22 B=0x33 A=0xFF\n\n```c\nwidget_set_style_color(label, \"style:normal:bg_color\", 0xFF332211);\n```", - "name": "widget_set_style_color", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - } - ], - "annotation": {}, - "desc": "创建一个bitmap对象,将控件绘制到bitmap上,并返回bitmap对象。\n\n调用者需要调用bitmap_destroy销毁返回的bitmap对象。\n\n```c\nbitmap_t* bitmap = widget_take_snapshot(window_manager());\nbitmap_save_png(bitmap, \"test.png\");\nbitmap_destroy(bitmap);\n```", - "name": "widget_take_snapshot", - "return": { - "type": "bitmap_t*", - "desc": "返回位图对象。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const rect_t*", - "name": "r", - "desc": "截屏区域(输入NULL,则为控件全区域截屏)。" - } - ], - "annotation": {}, - "desc": "创建一个bitmap对象,将控件绘制到bitmap上并且可以设置该控件的截屏区域,返回bitmap对象。\n\n调用者需要调用bitmap_destroy销毁返回的bitmap对象。\n\n```c\nbitmap_t* bitmap = widget_take_snapshot_rect(window_manager(), NULL);\nbitmap_save_png(bitmap, \"test.png\");\nbitmap_destroy(bitmap);\n```", - "name": "widget_take_snapshot_rect", - "return": { - "type": "bitmap_t*", - "desc": "返回位图对象。" - } - }, - { - "params": [], - "annotation": {}, - "desc": "获取canvas对象。", - "name": "widget_get_canvas", - "return": { - "type": "canvas_t*", - "desc": "返回canvas对象。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - } - ], - "annotation": {}, - "desc": "重置canvas对象。for designer only,调用者需要unload全部图片", - "name": "widget_reset_canvas", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - } - ], - "annotation": {}, - "desc": "绘制背景。", - "name": "widget_on_paint_background", - "return": { - "type": "ret_t", - "desc": "返回。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - } - ], - "annotation": {}, - "desc": "绘制自身。", - "name": "widget_on_paint_self", - "return": { - "type": "ret_t", - "desc": "返回。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - } - ], - "annotation": {}, - "desc": "绘制子控件。", - "name": "widget_on_paint_children", - "return": { - "type": "ret_t", - "desc": "返回。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "canvas_t*", - "name": "c", - "desc": "canvas对象。" - } - ], - "annotation": {}, - "desc": "绘制边框。", - "name": "widget_on_paint_border", - "return": { - "type": "ret_t", - "desc": "返回。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "widget_vtable_t*", - "name": "vt", - "desc": "虚表。" - } - ], - "annotation": {}, - "desc": "检查控件是否是指定的类型。", - "name": "widget_is_instance_of", - "return": { - "type": "bool_t", - "desc": "返回TRUE表示是,FALSE表示否。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - } - ], - "annotation": {}, - "desc": "设置控件需要relayout标识。", - "name": "widget_set_need_relayout_children", - "return": { - "type": "ret_t", - "desc": "返回。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - } - ], - "annotation": {}, - "desc": "使控件滚动到可见区域。", - "name": "widget_ensure_visible_in_viewport", - "return": { - "type": "ret_t", - "desc": "返回。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - } - ], - "annotation": {}, - "desc": "置焦点于第一个控件。", - "name": "widget_focus_first", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - } - ], - "annotation": {}, - "desc": "获取locale_info对象。", - "name": "widget_get_locale_info", - "return": { - "type": "locale_info_t*", - "desc": "返回locale_info对象。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - } - ], - "annotation": {}, - "desc": "获取image_manager对象。", - "name": "widget_get_image_manager", - "return": { - "type": "image_manager_t*", - "desc": "返回image_manager对象。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - } - ], - "annotation": {}, - "desc": "获取assets_manager对象。", - "name": "widget_get_assets_manager", - "return": { - "type": "assets_manager_t*", - "desc": "返回assets_manager对象。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - } - ], - "annotation": {}, - "desc": "获取font_manager对象。", - "name": "widget_get_font_manager", - "return": { - "type": "font_manager_t*", - "desc": "返回font_manager对象。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - } - ], - "annotation": {}, - "desc": "更新鼠标指针。", - "name": "widget_update_pointer_cursor", - "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": "widget_begin_wait_pointer_cursor", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - } - ], - "annotation": {}, - "desc": "结束等待鼠标指针。", - "name": "widget_end_wait_pointer_cursor", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "state_and_name", - "desc": "样式对应类型与名字。" - }, - { - "type": "const value_t*", - "name": "value", - "desc": "值。" - } - ], - "annotation": {}, - "desc": "设置widget私有样式。", - "name": "widget_set_style", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。。" - } - }, - { - "params": [], - "annotation": {}, - "desc": "计算icon text的位置。", - "name": "widget_calc_icon_text_rect", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - } - ], - "annotation": {}, - "desc": "设置需要更新Style。", - "name": "widget_set_need_update_style", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "widget对象。" - }, - { - "type": "str_t*", - "name": "str", - "desc": "用于保存xml结果。" - } - ], - "annotation": {}, - "desc": "将widget转换成xml。", - "name": "widget_to_xml", - "className": "widget_t", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [ - { - "name": "EVT_WILL_MOVE", - "desc": "控件移动前触发。", - "type": "event_t" - }, - { - "name": "EVT_MOVE", - "desc": "控件移动后触发。", - "type": "event_t" - }, - { - "name": "EVT_WILL_RESIZE", - "desc": "控件调整大小前触发。", - "type": "event_t" - }, - { - "name": "EVT_RESIZE", - "desc": "控件调整大小后触发。", - "type": "event_t" - }, - { - "name": "EVT_WILL_MOVE_RESIZE", - "desc": "控件移动并调整大小前触发。", - "type": "event_t" - }, - { - "name": "EVT_MOVE_RESIZE", - "desc": "控件移动并调整大小后触发。", - "type": "event_t" - }, - { - "name": "EVT_PROP_WILL_CHANGE", - "desc": "控件属性改变前触发(通过set_prop设置属性,才会触发)。", - "type": "prop_change_event_t" - }, - { - "name": "EVT_PROP_CHANGED", - "desc": "控件属性改变后触发(通过set_prop设置属性,才会触发)。", - "type": "prop_change_event_t" - }, - { - "name": "EVT_BEFORE_PAINT", - "desc": "控件绘制前触发。", - "type": "paint_event_t" - }, - { - "name": "EVT_AFTER_PAINT", - "desc": "控件绘制完成时触发。", - "type": "paint_event_t" - }, - { - "name": "EVT_FOCUS", - "desc": "控件得到焦点时触发。", - "type": "event_t" - }, - { - "name": "EVT_BLUR", - "desc": "控件失去焦点时触发。", - "type": "event_t" - }, - { - "name": "EVT_WHEEL", - "desc": "鼠标滚轮事件。", - "type": "wheel_event_t" - }, - { - "name": "EVT_POINTER_LEAVE", - "desc": "鼠标指针离开控件时触发。", - "type": "pointer_event_t" - }, - { - "name": "EVT_POINTER_ENTER", - "desc": "鼠标指针进入控件时触发。", - "type": "pointer_event_t" - }, - { - "name": "EVT_KEY_DOWN", - "desc": "键按下事件。", - "type": "pointer_event_t" - }, - { - "name": "EVT_KEY_UP", - "desc": "键释放事件。", - "type": "pointer_event_t" - }, - { - "name": "EVT_POINTER_DOWN", - "desc": "指针设备按下事件。", - "type": "pointer_event_t" - }, - { - "name": "EVT_POINTER_DOWN_ABORT", - "desc": "取消指针设备按下事件。", - "type": "pointer_event_t" - }, - { - "name": "EVT_POINTER_MOVE", - "desc": "指针设备移动事件。", - "type": "pointer_event_t" - }, - { - "name": "EVT_POINTER_UP", - "desc": "指针设备释放事件。", - "type": "pointer_event_t" - }, - { - "name": "EVT_DESTROY", - "desc": "控件销毁时触发。", - "type": "event_t" - } - ], - "properties": [ - { - "name": "x", - "desc": "x坐标(相对于父控件的x坐标)。", - "type": "xy_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "y", - "desc": "y坐标(相对于父控件的y坐标)。", - "type": "xy_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "w", - "desc": "宽度。", - "type": "wh_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "h", - "desc": "高度。", - "type": "wh_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "name", - "desc": "控件名字。", - "type": "char*", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "pointer_cursor", - "desc": "鼠标光标图片名称。", - "type": "char*", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "tr_text", - "desc": "保存用于翻译的字符串。", - "type": "char*", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "style", - "desc": "style的名称。", - "type": "char*", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "animation", - "desc": "动画参数。请参考[控件动画](https://github.com/zlgopen/awtk/blob/master/docs/widget_animator.md)", - "type": "char*", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "enable", - "desc": "启用/禁用状态。", - "type": "bool_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "feedback", - "desc": "是否启用按键音、触屏音和震动等反馈。", - "type": "bool_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "visible", - "desc": "是否可见。", - "type": "bool_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "sensitive", - "desc": "是否接受用户事件。", - "type": "bool_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "focusable", - "desc": "是否支持焦点停留。", - "type": "bool_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "with_focus_state", - "desc": "是否支持焦点状态。\n> 如果希望style支持焦点状态,但有不希望焦点停留,可用本属性。", - "type": "bool_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "auto_adjust_size", - "desc": "是否根据子控件和文本自动调整控件自身大小。\n\n> 为true时,最好不要使用child_layout,否则可能有冲突。\n> 注意:只是调整控件的本身的宽高,不会修改控件本身的位置。", - "type": "bool_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "focused", - "desc": "是否得到焦点。", - "type": "bool_t", - "annotation": { - "readable": true - } - }, - { - "name": "auto_created", - "desc": "是否由父控件自动创建。", - "type": "bool_t", - "annotation": { - "readable": true - } - }, - { - "name": "dirty", - "desc": "标识控件是否需要重绘。", - "type": "bool_t", - "annotation": { - "readable": true - } - }, - { - "name": "floating", - "desc": "标识控件是否启用浮动布局,不受父控件的children_layout的控制。", - "type": "bool_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "need_relayout_children", - "desc": "标识控件是否需要重新layout子控件。", - "type": "bool_t", - "annotation": { - "readable": true - } - }, - { - "name": "need_update_style", - "desc": "标识控件是否需要update style。", - "type": "bool_t", - "annotation": { - "readable": true - } - }, - { - "name": "ref_count", - "desc": "引用计数,计数为0时销毁。", - "type": "int32_t", - "annotation": { - "readable": true - } - }, - { - "name": "initializing", - "desc": "标识控件正在初始化。", - "type": "bool_t", - "annotation": { - "readable": true - } - }, - { - "name": "loading", - "desc": "标识控件正在加载。", - "type": "bool_t", - "annotation": { - "readable": true - } - }, - { - "name": "destroying", - "desc": "标识控件正在被销毁。", - "type": "bool_t", - "annotation": { - "readable": true - } - }, - { - "name": "state", - "desc": "控件的状态(取值参考widget_state_t)。", - "type": "uint8_t", - "annotation": { - "readable": true - } - }, - { - "name": "opacity", - "desc": "不透明度(0-255),0完全透明,255完全不透明。", - "type": "uint8_t", - "annotation": { - "readable": true - } - }, - { - "name": "dirty_rect_tolerance", - "desc": "脏矩形超出控件本身大小的最大范围(一般不用指定)。\n\n> 如果 border 太粗或 offset 太大等原因,导致脏矩形超出控件本身大小太多(大于缺省值)时,才需要指定。", - "type": "uint16_t", - "annotation": { - "readable": true, - "design": true, - "scriptable": true - } - }, - { - "name": "text", - "desc": "文本。用途视具体情况而定。", - "type": "wstr_t", - "annotation": { - "readable": true - } - }, - { - "name": "parent", - "desc": "父控件", - "type": "widget_t*", - "annotation": { - "readable": true, - "scriptable": true - } - }, - { - "name": "target", - "desc": "接收事件的子控件。", - "type": "widget_t*", - "annotation": { - "private": true - } - }, - { - "name": "grab_widget", - "desc": "grab事件的子控件。", - "type": "widget_t*", - "annotation": { - "private": true - } - }, - { - "name": "grab_widget_count", - "desc": "有时子控件和控件自己都会grab widget,所需要grab的计数。", - "type": "int32_t", - "annotation": { - "private": true - } - }, - { - "name": "key_target", - "desc": "接收按键事件的子控件。", - "type": "widget_t*", - "annotation": { - "private": true - } - }, - { - "name": "children", - "desc": "全部子控件。", - "type": "darray_t*", - "annotation": { - "readable": true - } - }, - { - "name": "emitter", - "desc": "事件发射器。", - "type": "emitter_t*", - "annotation": { - "readable": true - } - }, - { - "name": "astyle", - "desc": "Style对象。", - "type": "style_t*", - "annotation": { - "readable": true - } - }, - { - "name": "children_layout", - "desc": "子控件布局器。请参考[控件布局参数](https://github.com/zlgopen/awtk/blob/master/docs/layout.md)", - "type": "children_layouter_t*", - "annotation": { - "readable": true, - "set_prop": true, - "get_prop": true - } - }, - { - "name": "self_layout", - "desc": "控件布局器。请参考[控件布局参数](https://github.com/zlgopen/awtk/blob/master/docs/layout.md)", - "type": "self_layouter_t*", - "annotation": { - "readable": true, - "set_prop": true, - "get_prop": true - } - }, - { - "name": "custom_props", - "desc": "自定义属性。", - "type": "object_t*", - "annotation": { - "readable": true - } - }, - { - "name": "vt", - "desc": "虚函数表。", - "type": "widget_vtable_t", - "annotation": { - "readable": true - } - } - ], - "header": "base/widget.h", - "desc": "**widget_t** 是所有控件、窗口和窗口管理器的基类。\n**widget_t**也是一个容器,可放其它**widget_t**到它的内部,形成一个树形结构。\n\n```graphviz\n[default_style]\n\nwidget_t -> widget_t[arrowhead = \"diamond\"]\nwindow_t -> widget_t[arrowhead = \"empty\"]\nwindow_manager_t -> widget_t[arrowhead = \"empty\"]\nbutton_t -> widget_t[arrowhead = \"empty\"]\nlabel_t -> widget_t[arrowhead = \"empty\"]\nxxx_widget_t -> widget_t[arrowhead = \"empty\"]\n```\n\n通常**widget_t**通过一个矩形区域向用户呈现一些信息,接受用户的输入,并据此做出适当的反应。\n它负责控件的生命周期、通用状态、事件分发和Style的管理。\n本类提供的接口(函数和属性)除非特别说明,一般都适用于子类控件。\n\n为了便于解释,这里特别说明一下几个术语:\n\n* **父控件与子控件**:父控件与子控件指的两个控件的组合关系(这是在运行时决定的)。\n比如:在窗口中放一个按钮,此时,我们称按钮是窗口的子控件,窗口是按钮的父控件。\n\n```graphviz\n[default_style]\n\n子控件 -> 父控件[arrowhead = \"ediamond\"]\n```\n\n* **子类控件与父类控件**:子类控件与父类控件指的两类控件的继承关系(这是在设计时决定的)。\n比如:我们称**button_t**是**widget_t**的子类控件,**widget_t**是**button_t**的父类控件。\n\n```graphviz\n[default_style]\n\n子类控件 -> 父类控件[arrowhead = \"empty\"]\n\n```\n\nwidget相关的函数都只能在GUI线程中执行,如果需在非GUI线程中想调用widget相关函数,\n请用idle\\_queue或timer\\_queue进行串行化。\n请参考[demo thread](https://github.com/zlgopen/awtk/blob/master/demos/demo_thread_app.c)\n\n**widget\\_t**是抽象类,不要直接创建**widget\\_t**的实例。控件支持两种创建方式:\n\n* 通过XML创建。如:\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": "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": "创建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": "初始文件夹。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置 初始文件夹。", - "name": "file_browser_view_set_init_dir", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "widget对象。" - }, - { - "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": "uint32_t", - "name": "size", - "desc": "数据长度。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "在当前文件夹创建文件。", - "name": "file_browser_view_create_file", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [ - { - "name": "init_dir", - "desc": "初始文件夹。", - "type": "char*", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "filter", - "desc": "过滤规则。", - "type": "char*", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "ignore_hidden_files", - "desc": "是否忽略隐藏文件。", - "type": "bool_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "sort_ascending", - "desc": "是否为升序排序。", - "type": "bool_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "show_check_button", - "desc": "是否显示checkbutton。", - "type": "bool_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "sort_by", - "desc": "排序方式。可选值(name, size, mtime, type)。", - "type": "char*", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": 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", - "annotation": { - "scriptable": true, - "design": true, - "widget": true - }, - "level": 2 - }, - { - "type": "class", - "methods": [ - { - "params": [], - "annotation": { - "constructor": true, - "scriptable": true - }, - "desc": "创建file_chooser对象", - "name": "file_chooser_create", - "return": { - "type": "file_chooser_t*", - "desc": "对象。" - } - }, - { - "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对象。" - } - ], - "annotation": {}, - "desc": "销毁file_chooser对象(选择完成后自动调用)。", - "name": "file_chooser_destroy", - "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": "对象。" - } - }, - { - "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": "指针角度。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置指针角度。12点钟方向为0度,顺时钟方向为正,单位为度。", - "name": "guage_pointer_set_angle", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "image", - "desc": "指针的图片。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置指针的图片。", - "name": "guage_pointer_set_image", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "anchor_x", - "desc": "指针的锚点坐标x。(后面加上px为像素点,不加px为相对百分比坐标)" - }, - { - "type": "const char*", - "name": "anchor_y", - "desc": "指针的锚点坐标y。(后面加上px为像素点,不加px为相对百分比坐标)" - } - ], - "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", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "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": "间隔时间(毫秒)。" - } - ], - "annotation": { - "scriptable": 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", - "return": { - "type": "bool_t", - "desc": "返回TRUE表示是,否则表示否。" - } - } - ], - "events": [], - "properties": [ - { - "name": "image", - "desc": "图片名称的前缀。", - "type": "char*", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "sequence", - "desc": "播放的序列,字符可选值为数字和英文大小写字母,字符可以重复。如:0123456789或者123123abcd。", - "type": "char*", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "start_index", - "desc": "图片起始序数。", - "type": "uint32_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "end_index", - "desc": "图片结束序数。", - "type": "uint32_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "loop", - "desc": "是否循环播放。", - "type": "bool_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "auto_play", - "desc": "是否自动播放。", - "type": "bool_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", - "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", - "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_value对象", - "name": "image_value_create", - "return": { - "type": "widget_t*", - "desc": "对象。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "image_value对象。" - }, - { - "type": "const char*", - "name": "image", - "desc": "图片前缀。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置图片前缀。", - "name": "image_value_set_image", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "image_value对象。" - }, - { - "type": "const char*", - "name": "format", - "desc": "格式。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置格式。", - "name": "image_value_set_format", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "image_value对象。" - }, - { - "type": "double", - "name": "delta", - "desc": "增量。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置点击时加上的增量。", - "name": "image_value_set_click_add_delta", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "image_value对象。" - }, - { - "type": "double", - "name": "value", - "desc": "值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置值。", - "name": "image_value_set_value", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "image_min对象。" - }, - { - "type": "double", - "name": "min", - "desc": "最小值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置最小值。", - "name": "image_value_set_min", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "image_max对象。" - }, - { - "type": "double", - "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对象。" - } - ], - "annotation": { - "cast": true, - "scriptable": true - }, - "desc": "转换为image_value对象(供脚本语言使用)。", - "name": "image_value_cast", - "return": { - "type": "widget_t*", - "desc": "image_value对象。" - } - } - ], - "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" - } - ], - "properties": [ - { - "name": "image", - "desc": "图片名称的前缀。", - "type": "char*", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "format", - "desc": "数值到字符串转换时的格式,缺省为\"%d\"。", - "type": "char*", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "click_add_delta", - "desc": "点击时加上一个增量。", - "type": "double", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "value", - "desc": "值。", - "type": "double", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "min", - "desc": "最小值(如果设置了click\\_add\\_delta,到达最小值后回到最大值)。", - "type": "double", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "max", - "desc": "最大值(如果设置了click\\_add\\_delta,到达最大值后回到最小值)。", - "type": "double", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": 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", - "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 - }, - "desc": "创建candidates对象", - "name": "candidates_create", - "return": { - "type": "widget_t*", - "desc": "对象。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "candidates对象。" - } - ], - "annotation": { - "cast": true, - "scriptable": true - }, - "desc": "转换为candidates对象(供脚本语言使用)。", - "name": "candidates_cast", - "return": { - "type": "widget_t*", - "desc": "candidates对象。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "bool_t", - "name": "pre", - "desc": "是否为预候选字列表。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置是否为预候选字列表。\n\n> 为预候选字列表则注册EVT\\_IM\\_SHOW\\_PRE\\_CANDIDATES,否则注册EVT\\_IM\\_SHOW\\_CANDIDATES事件。", - "name": "candidates_set_pre", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "bool_t", - "name": "select_by_num", - "desc": "是否启用用数字选择候选字。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置是否启用用数字选择候选字。", - "name": "candidates_set_select_by_num", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "bool_t", - "name": "auto_hide", - "desc": "是否自动隐藏。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置是否自动隐藏。", - "name": "candidates_set_auto_hide", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "button_style", - "desc": "按钮的style名称。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置按钮的style名称。", - "name": "candidates_set_button_style", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [ - { - "name": "pre", - "desc": "是否为预候选字。\n\n> 预候选字: 在有的输入法中,比如T9硬键盘输入时,按下12两个键时,预候选字会显示可用的拼音列表。\n> 从预候选字列表中选择拼音,再查询拼音对应的候选字列表。", - "type": "bool_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "select_by_num", - "desc": "是否启用用数字选择候选字。比如按下1选择第1个候选字,按下2选择第2个候选字。", - "type": "bool_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "auto_hide", - "desc": "没有候选字时,是否自动隐藏控件。", - "type": "bool_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "button_style", - "desc": "按钮的style名称。", - "type": "char*", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - } - ], - "header": "keyboard/candidates.h", - "desc": "输入法候选字词控件。\n\n如果希望启用用数字选择对应的候选字,请设置属性grab_keys=\"true\"。如:\n\n```xml\n\n```\n\n>相关文件: assets/default/raw/ui/kb_default.xml\n\n如果希望通过左右键切换不同的候选字,除了设置属性grab_keys=\"true\",还需要设置按钮的focused状态的style。\n\n```xml\n\n```\n\n>相关文件:assets/default/raw/styles/keyboard.xml", - "name": "candidates_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": "创建lang_indicator对象", - "name": "lang_indicator_create", - "return": { - "type": "widget_t*", - "desc": "对象。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "image", - "desc": "缺省获得焦点的子控件(可用控件名或类型)。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置缺省获得焦点的子控件(可用控件名或类型)。", - "name": "lang_indicator_set_image", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "lang_indicator对象。" - } - ], - "annotation": { - "cast": true, - "scriptable": true - }, - "desc": "转换为lang_indicator对象(供脚本语言使用)。", - "name": "lang_indicator_cast", - "return": { - "type": "widget_t*", - "desc": "lang_indicator对象。" - } - } - ], - "events": [], - "properties": [ - { - "name": "image", - "desc": "如果希望用图片格式显示,本属性用于指定图片的前缀。", - "type": "char*", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - } - ], - "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", - "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": "创建line_number对象", - "name": "line_number_create", - "return": { - "type": "widget_t*", - "desc": "对象。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "int32_t", - "name": "top_margin", - "desc": "顶部边距。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置顶部边距。", - "name": "line_number_set_top_margin", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "int32_t", - "name": "bottom_margin", - "desc": "顶部边距。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置顶部边距。", - "name": "line_number_set_bottom_margin", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "int32_t", - "name": "line_height", - "desc": "行高。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置行高。", - "name": "line_number_set_line_height", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "int32_t", - "name": "yoffset", - "desc": "行高。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置y偏移。", - "name": "line_number_set_yoffset", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "line_number对象。" - } - ], - "annotation": { - "cast": true, - "scriptable": true - }, - "desc": "转换为line_number对象(供脚本语言使用)。", - "name": "line_number_cast", - "return": { - "type": "widget_t*", - "desc": "line_number对象。" - } - } - ], - "events": [], - "properties": [], - "header": "mledit/line_number.h", - "desc": "行号。多行编辑器的行号。\n\nline\\_number\\_t是[widget\\_t](widget_t.md)的子类控件,widget\\_t的函数均适用于line\\_number\\_t控件。\n\n在xml中使用\"lin\\e_number\"标签创建行号控件,一般配合mledit使用。如:\n\n```xml\n\n\n\n\n```\n\n> 更多用法请参考:[mledit.xml](\nhttps://github.com/zlgopen/awtk/blob/master/design/default/ui/mledit.xml)\n\n可用通过style来设置控件的显示风格,如字体的大小和颜色等等。如:\n\n```xml\n\n\n\n```\n\n> 更多用法请参考:\n[theme default](\nhttps://github.com/zlgopen/awtk/blob/master/design/default/styles/default.xml#L556)", - "name": "line_number_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": "创建mledit对象", - "name": "mledit_create", - "return": { - "type": "widget_t*", - "desc": "对象。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "widget对象。" - }, - { - "type": "bool_t", - "name": "readonly", - "desc": "只读。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置编辑器是否为只读。", - "name": "mledit_set_readonly", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "widget对象。" - }, - { - "type": "bool_t", - "name": "cancelable", - "desc": "是否为可撤销修。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置编辑器是否为可撤销修改。", - "name": "mledit_set_cancelable", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "widget对象。" - }, - { - "type": "bool_t", - "name": "focus", - "desc": "是否为焦点。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置为焦点。", - "name": "mledit_set_focus", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "widget对象。" - }, - { - "type": "bool_t", - "name": "wrap_word", - "desc": "是否自动折行。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置编辑器是否自动折行。", - "name": "mledit_set_wrap_word", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "widget对象。" - }, - { - "type": "uint32_t", - "name": "max_lines", - "desc": "最大行数。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置编辑器的最大行数。", - "name": "mledit_set_max_lines", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "widget对象。" - }, - { - "type": "char*", - "name": "tips", - "desc": "输入提示。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置编辑器的输入提示。", - "name": "mledit_set_tips", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "tr_tips", - "desc": "提示信息。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "获取翻译之后的文本,然后调用mledit_set_tips。", - "name": "mledit_set_tr_tips", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "widget对象。" - }, - { - "type": "char*", - "name": "keyboard", - "desc": "键盘名称(相应UI资源必须存在)。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置自定义软键盘名称。", - "name": "mledit_set_keyboard", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "widget对象。" - }, - { - "type": "uint32_t", - "name": "cursor", - "desc": "光标位置。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置编辑器光标位置。", - "name": "mledit_set_cursor", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "widget对象。" - }, - { - "type": "uint32_t", - "name": "scroll_line", - "desc": "滚动行数。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置编辑器滚动速度。", - "name": "mledit_set_scroll_line", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "widget对象。" - }, - { - "type": "bool_t", - "name": "open_im_when_focused", - "desc": "是否在获得焦点时打开输入法。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置编辑器是否在获得焦点时打开输入法。\n\n> * 设置默认焦点时,打开窗口时不弹出软键盘。\n> * 用键盘切换焦点时,编辑器获得焦点时不弹出软键盘。", - "name": "mledit_set_open_im_when_focused", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "widget对象。" - }, - { - "type": "bool_t", - "name": "close_im_when_blured", - "desc": "是否是否在失去焦点时关闭输入法。在失去焦点时关闭输入法。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置编辑器是否在失去焦点时关闭输入法。", - "name": "mledit_set_close_im_when_blured", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "mledit对象。" - } - ], - "annotation": { - "cast": true, - "scriptable": true - }, - "desc": "转换为mledit对象(供脚本语言使用)。", - "name": "mledit_cast", - "return": { - "type": "widget_t*", - "desc": "mledit对象。" - } - } - ], - "events": [ - { - "name": "EVT_VALUE_CHANGING", - "desc": "文本正在改变事件(编辑中)。", - "type": "event_t" - }, - { - "name": "EVT_VALUE_CHANGED", - "desc": "文本改变事件。", - "type": "event_t" - } - ], - "properties": [ - { - "name": "readonly", - "desc": "编辑器是否为只读。", - "type": "bool_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "top_margin", - "desc": "上边距。", - "type": "uint8_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "bottom_margin", - "desc": "下边距。", - "type": "uint8_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "left_margin", - "desc": "左边距。", - "type": "uint8_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "right_margin", - "desc": "右边距。", - "type": "uint8_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "tips", - "desc": "输入提示。", - "type": "char*", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "tr_tips", - "desc": "保存用于翻译的提示信息。", - "type": "char*", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "keyboard", - "desc": "自定义软键盘名称。", - "type": "char*", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "wrap_word", - "desc": "是否自动折行。", - "type": "bool_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "max_lines", - "desc": "最大行数。", - "type": "uint32_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "scroll_line", - "desc": "鼠标一次滚动行数。", - "type": "uint32_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "cancelable", - "desc": "是否支持撤销编辑。如果为TRUE,在失去焦点之前可以撤销所有修改(恢复获得焦点之前的内容)。\n\n> * 1.一般配合keyboard的\"cancel\"按钮使用。\n> * 2.为TRUE时,如果内容有变化,会设置编辑器的状态为changed,所以此时编辑器需要支持changed状态的style。", - "type": "bool_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "open_im_when_focused", - "desc": "获得焦点时打开输入法。\n\n> 主要用于没有指针设备的情况,否则每次切换焦点时都打开输入法。", - "type": "bool_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "close_im_when_blured", - "desc": "是否在失去焦点时关闭输入法(默认是)。", - "type": "bool_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - } - ], - "header": "mledit/mledit.h", - "desc": "多行编辑器控件。\n\nmledit\\_t是[widget\\_t](widget_t.md)的子类控件,widget\\_t的函数均适用于mledit\\_t控件。\n\n在xml中使用\"mledit\"标签创建多行编辑器控件。如:\n\n```xml\n\n```\n\n> 更多用法请参考:[mledit.xml](\nhttps://github.com/zlgopen/awtk/blob/master/design/default/ui/mledit.xml)\n\n在c代码中使用函数mledit\\_create创建多行编辑器控件。如:\n\n```c\nwidget_t* tc = mledit_create(win, 10, 10, 240, 240);\n```\n\n> 完整示例请参考:[mledit demo](\nhttps://github.com/zlgopen/awtk-c-demos/blob/master/demos/mledit.c)\n\ntime\\_clock一般不需要设置style。", - "name": "mledit_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": "创建progress_circle对象", - "name": "progress_circle_create", - "return": { - "type": "widget_t*", - "desc": "对象。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "progress_circle对象。" - } - ], - "annotation": { - "cast": true, - "scriptable": true - }, - "desc": "转换为progress_circle对象(供脚本语言使用)。", - "name": "progress_circle_cast", - "return": { - "type": "widget_t*", - "desc": "progress_circle对象。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "float_t", - "name": "value", - "desc": "值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置值。", - "name": "progress_circle_set_value", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "uint32_t", - "name": "max", - "desc": "最大值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置最大值。", - "name": "progress_circle_set_max", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "uint32_t", - "name": "line_width", - "desc": "环线的厚度。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置环线的厚度。", - "name": "progress_circle_set_line_width", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "int32_t", - "name": "start_angle", - "desc": "起始角度。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置起始角度。", - "name": "progress_circle_set_start_angle", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "unit", - "desc": "单位。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置单位。", - "name": "progress_circle_set_unit", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "const char*", - "name": "line_cap", - "desc": "线帽类型(round:圆头,square:方头)。。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置线帽类型。", - "name": "progress_circle_set_line_cap", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "bool_t", - "name": "show_text", - "desc": "是否显示文本。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置是否显示文本。", - "name": "progress_circle_set_show_text", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "bool_t", - "name": "counter_clock_wise", - "desc": "是否为逆时针方向。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置是否为逆时针方向。", - "name": "progress_circle_set_counter_clock_wise", - "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": "值(缺省为0)。", - "type": "float_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "max", - "desc": "最大值(缺省为100)。", - "type": "uint32_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "start_angle", - "desc": "起始角度(单位为度,缺省-90)。", - "type": "int32_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "line_width", - "desc": "环线的厚度(缺省为8)。", - "type": "uint32_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "unit", - "desc": "单元(缺省无)。", - "type": "char*", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "line_cap", - "desc": "线帽类型(round:圆头,square:方头)。", - "type": "char*", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "counter_clock_wise", - "desc": "是否为逆时针方向(缺省为FALSE)。", - "type": "bool_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "show_text", - "desc": "是否显示文本(缺省为TRUE)。", - "type": "bool_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - } - ], - "header": "progress_circle/progress_circle.h", - "desc": "进度圆环控件。\n\nprogress\\_circle\\_t是[widget\\_t](widget_t.md)的子类控件,widget\\_t的函数均适用于progress\\_circle\\_t控件。\n\n在xml中使用\"progress\\_circle\"标签创建进度圆环控件。如:\n\n```xml\n\n```\n\n> 更多用法请参考:\n[progress_circle.xml](https://github.com/zlgopen/awtk/blob/master/design/default/ui/progress_circle.xml)\n\n在c代码中使用函数progress\\_circle\\_create创建进度圆环控件。如:\n\n```c\nprogress_circle = progress_circle_create(win, 10, 10, 200, 200);\nprogress_circle_set_max(progress_circle, 360);\nwidget_set_value(progress_circle, 128);\n```\n\n> 完整示例请参考:\n[progress_circle\ndemo](https://github.com/zlgopen/awtk-c-demos/blob/master/demos/progress_circle.c)\n\n可用通过style来设置控件的显示风格,如字体的大小和颜色等等。如:\n\n```xml\n\n```\n\n> 更多用法请参考:\n[theme\ndefault](https://github.com/zlgopen/awtk/blob/master/design/default/styles/default.xml#L467)", - "name": "progress_circle_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": "创建rich_text_view对象", - "name": "rich_text_view_create", - "return": { - "type": "widget_t*", - "desc": "对象。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "rich_text_view对象。" - } - ], - "annotation": { - "cast": true, - "scriptable": true - }, - "desc": "转换为rich_text_view对象(供脚本语言使用)。", - "name": "rich_text_view_cast", - "return": { - "type": "widget_t*", - "desc": "rich_text_view对象。" - } - } - ], - "events": [], - "properties": [], - "header": "rich_text/rich_text_view.h", - "desc": "rich_text_view是一个专用容器,用来放rich text和 scroll bar,并在两者之间建立联系。\n\nrich_text_view\\_t是[widget\\_t](widget_t.md)的子类控件,widget\\_t的函数均适用于rich_text_view\\_t控件。\n\n在xml中使用\"rich_text_view\"标签创建rich_text_view。如:\n\n```xml\n\n\n...\n\n\n\n```\n\n可用通过style来设置控件的显示风格,如背景颜色等。如:\n\n```xml\n\n```", - "name": "rich_text_view_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": "创建rich_text对象", - "name": "rich_text_create", - "return": { - "type": "widget_t*", - "desc": "对象。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "char*", - "name": "text", - "desc": "文本。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置文本。", - "name": "rich_text_set_text", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "bool_t", - "name": "yslidable", - "desc": "是否允许滑动。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置是否允许y方向滑动。", - "name": "rich_text_set_yslidable", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "rich_text对象。" - } - ], - "annotation": { - "cast": true, - "scriptable": true - }, - "desc": "转换为rich_text对象(供脚本语言使用)。", - "name": "rich_text_cast", - "return": { - "type": "widget_t*", - "desc": "rich_text对象。" - } - } - ], - "events": [], - "properties": [ - { - "name": "line_gap", - "desc": "行间距。", - "type": "uint32_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "margin", - "desc": "边距。", - "type": "uint32_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "yslidable", - "desc": "标识控件是否允许上下拖动。", - "type": "bool_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "yoffset", - "desc": "y偏移。", - "type": "int32_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true - } - }, - { - "name": "need_reset", - "desc": "标识控件是否需要重新绘图。", - "type": "bool_t", - "annotation": { - "readable": true - } - } - ], - "header": "rich_text/rich_text.h", - "desc": "图文混排控件,实现简单的图文混排。\n\nrich\\_text\\_t是[widget\\_t](widget_t.md)的子类控件,widget\\_t的函数均适用于rich\\_text\\_t控件。\n\n在xml中使用\"rich\\_text\"标签创建图文混排控件。如:\n\n```xml\nhello awtk!\" />\n```\n>\n\n> 更多用法请参考:\n[rich_text.xml](https://github.com/zlgopen/awtk/blob/master/design/default/ui/rich_text.xml)\n\n在c代码中使用函数rich\\_text\\_create创建图文混排控件。如:\n\n```c\nwidget_t* rich_text = rich_text_create(win, 0, 0, 0, 0);\nwidget_set_text_utf8(rich_text,\n\"hello awtk!ProTip! The \"\n\"feed shows you events from people you follow and repositories you watch. \"\n\"nhello world. 确定取消中文字符测试。确定。取消。中文字符测试。\");\n\nwidget_set_self_layout_params(rich_text, \"center\", \"middle\", \"100%\", \"100%\");\n```\n\n> 完整示例请参考:\n[rich_text demo](https://github.com/zlgopen/awtk-c-demos/blob/master/demos/rich_text.c)\n\n可用通过style来设置控件的显示风格,如背景颜色等等。而字体的大小和颜色则由文本内部的属性决定。\n\n目前支持image和font两个tag:\n\n* image 支持的属性有:\n* name 图片的名称。\n* w 图片的宽度。\n* h 图片的高度。\n\n* font 支持的属性有:\n* color 颜色。\n* size 大小。\n* align_v 垂直方向对齐的方式(top|middle|bottom)。\n* bold 粗体(暂不支持)\n* italic 斜体(暂不支持)\n* underline 下划线(暂不支持)", - "name": "rich_text_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": "创建hscroll_label对象", - "name": "hscroll_label_create", - "return": { - "type": "widget_t*", - "desc": "对象。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "int32_t", - "name": "lull", - "desc": "间歇时间(ms)。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置lull。", - "name": "hscroll_label_set_lull", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "int32_t", - "name": "duration", - "desc": "滚动时间(ms)。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置duration。", - "name": "hscroll_label_set_duration", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "bool_t", - "name": "only_focus", - "desc": "是否只有处于focus时才滚动。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置only_focus。", - "name": "hscroll_label_set_only_focus", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "bool_t", - "name": "only_parent_focus", - "desc": "是否只有处于focus时才滚动。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置only_parent_focus。", - "name": "hscroll_label_set_only_parent_focus", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "bool_t", - "name": "loop", - "desc": "是否循环滚动。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置loop。", - "name": "hscroll_label_set_loop", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "bool_t", - "name": "yoyo", - "desc": "是否往返滚动。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置yoyo。", - "name": "hscroll_label_set_yoyo", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "bool_t", - "name": "ellipses", - "desc": "是否在文本超长时在行尾显示\"...\"。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置ellipses。", - "name": "hscroll_label_set_ellipses", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "int32_t", - "name": "xoffset", - "desc": "x偏移。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置x偏移(一般无需用户调用)。。", - "name": "hscroll_label_set_xoffset", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "启动(一般无需用户调用)。", - "name": "hscroll_label_start", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "停止(一般无需用户调用)。", - "name": "hscroll_label_stop", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "hscroll_label对象。" - } - ], - "annotation": { - "cast": true, - "scriptable": true - }, - "desc": "转换为hscroll_label对象(供脚本语言使用)。", - "name": "hscroll_label_cast", - "return": { - "type": "widget_t*", - "desc": "hscroll_label对象。" - } - } - ], - "events": [], - "properties": [ - { - "name": "only_focus", - "desc": "只有处于focus时才滚动(缺省否)。", - "type": "bool_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "only_parent_focus", - "desc": "只有父控件处于focus时才滚动(缺省否)。", - "type": "bool_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "loop", - "desc": "loop是否循环滚动(缺省FALSE)。", - "type": "bool_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "yoyo", - "desc": "是否往返滚动(缺省FALSE)。", - "type": "bool_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "ellipses", - "desc": "文本显示不下时,在行尾显示省略号(缺省FALSE)。", - "type": "bool_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "lull", - "desc": "滚动之间的间歇时间(ms),缺省3000ms。", - "type": "int32_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "duration", - "desc": "完整的滚动一次需要的时间(ms),缺省5000ms。", - "type": "int32_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "scriptable": true - } - }, - { - "name": "xoffset", - "desc": "偏移量。", - "type": "int32_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "scriptable": true - } - }, - { - "name": "text_w", - "desc": "文本的宽度。", - "type": "int32_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "scriptable": true - } - } - ], - "header": "scroll_label/hscroll_label.h", - "desc": "可水平滚动的文本控件,方便实现长文本滚动。\n\n\nhscroll\\_label\\_t是[widget\\_t](widget_t.md)的子类控件,widget\\_t的函数均适用于hscroll\\_label\\_t控件。\n\n在xml中使用\"hscroll\\_label\"标签创建行号控件,一般配合mledit使用。如:\n\n```xml\n```\n\n> 更多用法请参考:[mledit.xml](\nhttps://github.com/zlgopen/awtk/blob/master/design/default/ui/mledit.xml)\n\n可用通过style来设置控件的显示风格,如字体的大小和颜色等等。如:\n\n```xml\n\n```\n\n> 更多用法请参考:\n[theme default](\nhttps://github.com/zlgopen/awtk/blob/master/design/default/styles/default.xml)", - "name": "hscroll_label_t", - "parent": "widget_t", - "annotation": { - "scriptable": true, - "design": true, - "widget": true - }, - "level": 2 - }, - { - "type": "class", - "methods": [ - { - "params": [], - "annotation": { - "constructor": true - }, - "desc": "创建子控件布局对象。", - "name": "children_layouter_list_view_create", - "return": { - "type": "children_layouter_t*", - "desc": "返回创建子控件布局对象。" - } - } - ], - "events": [], - "properties": [], - "header": "scroll_view/children_layouter_list_view.h", - "desc": "listview的子控件布局算法实现。\n\n> 用法请参考:[listview子控件布局算法](\nhttps://github.com/zlgopen/awtk/blob/master/docs/children_layouter_list_view.md)", - "name": "children_layouter_list_view_t", - "parent": "children_layouter_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": "创建list_item对象", - "name": "list_item_create", - "return": { - "type": "widget_t*", - "desc": "对象。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "list_item对象。" - } - ], - "annotation": { - "cast": true, - "scriptable": true - }, - "desc": "转换为list_item对象(供脚本语言使用)。", - "name": "list_item_cast", - "return": { - "type": "widget_t*", - "desc": "list_item对象。" - } - } - ], - "events": [], - "properties": [], - "header": "scroll_view/list_item.h", - "desc": "列表项控件。\n\n列表项控件是一个简单的容器控件,一般作为列表视图中滚动视图的子控件。\n\nlist\\_item\\_t是[widget\\_t](widget_t.md)的子类控件,widget\\_t的函数均适用于list\\_item\\_t控件。\n\n在xml中使用\"list\\_item\"标签创建列表项控件。如:\n\n```xml\n\n\n\n\n\n\n...\n\n\n```\n\n> 更多用法请参考:[list\\_view\\_m.xml](\nhttps://github.com/zlgopen/awtk/blob/master/design/default/ui/list_view_m.xml)\n\n在c代码中使用函数list\\_item\\_create创建列表项控件。如:\n\n```c\nwidget_t* list_item = list_item_create(scroll_view, 0, 0, 0, 0);\n```\n\n> 列表项控件大小一般由列表控制,不需指定xywh参数。\n\n可以用style来实现可点击或不可点击的效果。如:\n\n```xml\n\n```\n\n> 更多用法请参考:[theme default](\nhttps://github.com/zlgopen/awtk/blob/master/design/default/styles/default.xml#L372)", - "name": "list_item_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": "创建list_view_h对象", - "name": "list_view_h_create", - "return": { - "type": "widget_t*", - "desc": "对象。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "int32_t", - "name": "item_width", - "desc": "列表项的宽度。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置列表项的宽度。", - "name": "list_view_h_set_item_width", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "int32_t", - "name": "spacing", - "desc": "列表项的间距。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置列表项的间距。", - "name": "list_view_h_set_spacing", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "list_view_h对象。" - } - ], - "annotation": { - "cast": true, - "scriptable": true - }, - "desc": "转换为list_view_h对象(供脚本语言使用)。", - "name": "list_view_h_cast", - "return": { - "type": "widget_t*", - "desc": "list_view_h对象。" - } - } - ], - "events": [], - "properties": [ - { - "name": "item_width", - "desc": "列表项的宽度。", - "type": "int32_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "spacing", - "desc": "间距。", - "type": "int32_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - } - ], - "header": "scroll_view/list_view_h.h", - "desc": "水平列表视图控件。\n\nlist\\_view\\_h\\_t是[widget\\_t](widget_t.md)的子类控件,widget\\_t的函数均适用于list\\_view\\_h\\_t控件。\n\n在xml中使用\"list\\_view\\_h\"标签创建水平列表视图控件。如:\n\n```xml\n\n\n\n...\n\n\n```\n\n> 注意:列表项不是作为列表视图控件的直接子控件,而是作为滚动视图的子控件。\n\n\n> 更多用法请参考:[list\\_view\\_h.xml](\nhttps://github.com/zlgopen/awtk/blob/master/design/default/ui/list_view_h.xml)\n\n在c代码中使用函数list\\_view\\_h\\_create创建水平列表视图控件。如:\n\n```c\nwidget_t* list_view = list_view_h_create(win, 0, 0, 0, 0);\n```\n\n用代码构造列表视图是比较繁琐的事情,最好用XML来构造。\n如果需要动态修改,可以使用widget\\_clone来增加列表项,使用widget\\_remove\\_child来移出列表项。\n\n可用通过style来设置控件的显示风格,如背景颜色和边框颜色等(一般情况不需要)。", - "name": "list_view_h_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": "创建list_view对象", - "name": "list_view_create", - "return": { - "type": "widget_t*", - "desc": "对象。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "int32_t", - "name": "item_height", - "desc": "列表项的高度。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置列表项的高度。", - "name": "list_view_set_item_height", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "int32_t", - "name": "default_item_height", - "desc": "列表项的高度。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置列表项的缺省高度。", - "name": "list_view_set_default_item_height", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "bool_t", - "name": "auto_hide_scroll_bar", - "desc": "是否自动隐藏滚动条。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置是否自动隐藏滚动条。", - "name": "list_view_set_auto_hide_scroll_bar", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "list_view对象。" - } - ], - "annotation": { - "cast": true, - "scriptable": true - }, - "desc": "转换为list_view对象(供脚本语言使用)。", - "name": "list_view_cast", - "return": { - "type": "widget_t*", - "desc": "list_view对象。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "list_view对象。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "list_view重新初始化。", - "name": "list_view_reinit", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [], - "properties": [ - { - "name": "item_height", - "desc": "列表项的高度。如果 item_height > 0,所有列表项使用固定高度,否则使用列表项自身的高度。", - "type": "int32_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "default_item_height", - "desc": "列表项的缺省高度。如果item_height <= 0 而且列表项自身的高度 <= 0,则使用缺省高度。", - "type": "int32_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "auto_hide_scroll_bar", - "desc": "如果不需要滚动条时,自动隐藏滚动条。", - "type": "bool_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - } - ], - "header": "scroll_view/list_view.h", - "desc": "列表视图控件。\n\n列表视图控件是一个可以垂直滚动的列表控件。\n\n如果不需要滚动,可以用view控件配置适当的layout参数作为列表控件。\n\n列表视图中的列表项可以固定高度,也可以使用不同高度。请参考[变高列表项](\nhttps://github.com/zlgopen/awtk/blob/master/design/default/ui/list_view_vh.xml)\n\n列表视图控件的中可以有滚动条,也可以没有滚动条。\n可以使用移动设备风格的滚动条,也可以使用桌面风格的滚动条。\n\nlist\\_view\\_t是[widget\\_t](widget_t.md)的子类控件,widget\\_t的函数均适用于list\\_view\\_t控件。\n\n在xml中使用\"list\\_view\"标签创建列表视图控件。如:\n\n```xml\n\n\n\n\n\n\n...\n\n\n```\n\n> 注意:列表项不是作为列表视图控件的直接子控件,而是作为滚动视图的子控件。\n\n\n> 更多用法请参考:[list\\_view\\_m.xml](\nhttps://github.com/zlgopen/awtk/blob/master/design/default/ui/list_view_m.xml)\n\n在c代码中使用函数list\\_view\\_create创建列表视图控件。如:\n\n```c\nwidget_t* list_view = list_view_create(win, 0, 0, 0, 0);\n```\n\n用代码构造列表视图是比较繁琐的事情,最好用XML来构造。\n如果需要动态修改,可以使用widget\\_clone来增加列表项,使用widget\\_remove\\_child来移出列表项。\n\n可用通过style来设置控件的显示风格,如背景颜色和边框颜色等(一般情况不需要)。", - "name": "list_view_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": "创建scroll_bar对象\n\n> 根据宏WITH_DESKTOP_STYLE决定创建desktop风格还是mobile风格的滚动条", - "name": "scroll_bar_create", - "return": { - "type": "widget_t*", - "desc": "对象。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "scroll_bar对象。" - } - ], - "annotation": { - "cast": true, - "scriptable": true - }, - "desc": "转换为scroll_bar对象(供脚本语言使用)。", - "name": "scroll_bar_cast", - "return": { - "type": "widget_t*", - "desc": "scroll_bar对象。" - } - }, - { - "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": "创建mobile风格的scroll_bar对象", - "name": "scroll_bar_create_mobile", - "return": { - "type": "widget_t*", - "desc": "对象。" - } - }, - { - "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": "创建desktop风格的scroll_bar对象", - "name": "scroll_bar_create_desktop", - "return": { - "type": "widget_t*", - "desc": "对象。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "scroll_bar控件。" - }, - { - "type": "int32_t", - "name": "virtual_size", - "desc": "虚拟高度。" - }, - { - "type": "int32_t", - "name": "row", - "desc": "每一行的高度。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置参数。", - "name": "scroll_bar_set_params", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "scroll_bar控件。" - }, - { - "type": "int32_t", - "name": "value", - "desc": "值。" - }, - { - "type": "int32_t", - "name": "duration", - "desc": "动画持续时间。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "滚动到指定的值。", - "name": "scroll_bar_scroll_to", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "scroll_bar控件。" - }, - { - "type": "int32_t", - "name": "value", - "desc": "值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置值,并触发EVT_VALUE_CHANGED事件。", - "name": "scroll_bar_set_value", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "scroll_bar控件。" - }, - { - "type": "int32_t", - "name": "delta", - "desc": "值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "在当前的值上增加一个值,并触发EVT_VALUE_CHANGED事件。", - "name": "scroll_bar_add_delta", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "scroll_bar控件。" - }, - { - "type": "int32_t", - "name": "delta", - "desc": "值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "在当前的值上增加一个值,并滚动到新的值,并触发EVT_VALUE_CHANGED事件。", - "name": "scroll_bar_scroll_delta", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "scroll_bar控件。" - }, - { - "type": "int32_t", - "name": "value", - "desc": "值。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置值,但不触发EVT_VALUE_CHANGED事件。", - "name": "scroll_bar_set_value_only", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "scroll_bar控件。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "判断是否是mobile风格的滚动条。", - "name": "scroll_bar_is_mobile", - "return": { - "type": "bool_t", - "desc": "返回TRUE表示是mobile风格的,否则表示不是mobile风格的。" - } - } - ], - "events": [], - "properties": [ - { - "name": "virtual_size", - "desc": "虚拟宽度或高度。", - "type": "int32_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "value", - "desc": "当前的值。", - "type": "int32_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "row", - "desc": "行的高度。", - "type": "int32_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "animatable", - "desc": "滚动时是否启用动画。", - "type": "bool_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - } - ], - "header": "scroll_view/scroll_bar.h", - "desc": "滚动条控件。\n\n> 目前只支持垂直滚动。\n\nscroll\\_bar\\_t是[widget\\_t](widget_t.md)的子类控件,widget\\_t的函数均适用于scroll\\_bar\\_t控件。\n\n在xml中使用\"scroll\\_bar\"或\"scroll\\_bar\\_d\"或\"scroll\\_bar\\_m\"标签创建滚动条控件。如:\n\n```xml\n\n\n...\n\n\n\n```\n\n> 更多用法请参考:[list\\_view\\_m.xml](\nhttps://github.com/zlgopen/awtk/blob/master/design/default/ui/list_view_m.xml)\n\n在c代码中使用函数scroll\\_bar\\_create创建列表项控件。如:\n\n```c\nwidget_t* scroll_bar = scroll_bar_create(list_view, 0, 0, 0, 0);\n```\n\n```xml\n\n```\n\n> 更多用法请参考:[theme default](\nhttps://github.com/zlgopen/awtk/blob/master/design/default/styles/default.xml#L350)", - "name": "scroll_bar_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": "创建scroll_view对象", - "name": "scroll_view_create", - "return": { - "type": "widget_t*", - "desc": "对象。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "scroll_view对象。" - } - ], - "annotation": { - "cast": true, - "scriptable": true - }, - "desc": "转换为scroll_view对象(供脚本语言使用)。", - "name": "scroll_view_cast", - "return": { - "type": "widget_t*", - "desc": "scroll_view对象。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "wh_t", - "name": "w", - "desc": "虚拟宽度。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置虚拟宽度。", - "name": "scroll_view_set_virtual_w", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "wh_t", - "name": "h", - "desc": "虚拟高度。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置虚拟高度。", - "name": "scroll_view_set_virtual_h", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "bool_t", - "name": "xslidable", - "desc": "是否允许滑动。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置是否允许x方向滑动。", - "name": "scroll_view_set_xslidable", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "bool_t", - "name": "yslidable", - "desc": "是否允许滑动。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置是否允许y方向滑动。", - "name": "scroll_view_set_yslidable", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "bool_t", - "name": "snap_to_page", - "desc": "是否按页面对齐。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置滚动时offset是否按页面对齐。", - "name": "scroll_view_set_snap_to_page", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "int32_t", - "name": "xoffset", - "desc": "x偏移量。" - }, - { - "type": "int32_t", - "name": "yoffset", - "desc": "y偏移量。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置偏移量。", - "name": "scroll_view_set_offset", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "float_t", - "name": "xspeed_scale", - "desc": "x偏移速度比例。" - }, - { - "type": "float_t", - "name": "yspeed_scale", - "desc": "y偏移速度比例。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置偏移速度比例。", - "name": "scroll_view_set_speed_scale", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "int32_t", - "name": "xoffset_end", - "desc": "x偏移量。" - }, - { - "type": "int32_t", - "name": "yoffset_end", - "desc": "y偏移量。" - }, - { - "type": "int32_t", - "name": "duration", - "desc": "时间。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "滚动到指定的偏移量。", - "name": "scroll_view_scroll_to", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "控件对象。" - }, - { - "type": "int32_t", - "name": "xoffset_delta", - "desc": "x偏移量。" - }, - { - "type": "int32_t", - "name": "yoffset_delta", - "desc": "y偏移量。" - }, - { - "type": "int32_t", - "name": "duration", - "desc": "时间。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "滚动到指定的偏移量。", - "name": "scroll_view_scroll_delta_to", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - } - ], - "events": [ - { - "name": "EVT_SCROLL_START", - "desc": "开始滚动事件。", - "type": "event_t" - }, - { - "name": "EVT_SCROLL_END", - "desc": "结束滚动事件。", - "type": "event_t" - }, - { - "name": "EVT_SCROLL", - "desc": "滚动事件。", - "type": "event_t" - } - ], - "properties": [ - { - "name": "virtual_w", - "desc": "虚拟宽度。", - "type": "wh_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "virtual_h", - "desc": "虚拟高度。", - "type": "wh_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "xoffset", - "desc": "x偏移量。", - "type": "int32_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "yoffset", - "desc": "y偏移量。", - "type": "int32_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "xspeed_scale", - "desc": "x偏移速度比例。", - "type": "float_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "yspeed_scale", - "desc": "y偏移速度比例。", - "type": "float_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "xslidable", - "desc": "是否允许x方向滑动。", - "type": "bool_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "yslidable", - "desc": "是否允许y方向滑动。", - "type": "bool_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "snap_to_page", - "desc": "滚动时offset是否按页面对齐。", - "type": "bool_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - } - ], - "header": "scroll_view/scroll_view.h", - "desc": "滚动视图。\n\nscroll\\_view\\_t是[widget\\_t](widget_t.md)的子类控件,widget\\_t的函数均适用于scroll\\_view\\_t控件。\n\n在xml中使用\"scroll\\_view\"标签创建滚动视图控件。如:\n\n```xml\n\n\n\n\n\n\n...\n\n\n```\n\n> 滚动视图一般作为列表视图的子控件使用。\n\n> 更多用法请参考:[list\\_view\\_m.xml](\nhttps://github.com/zlgopen/awtk/blob/master/design/default/ui/list_view_m.xml)\n\n在c代码中使用函数scroll\\_view\\_create创建列表视图控件。如:\n\n```c\nwidget_t* scroll_view = scroll_view_create(win, 0, 0, 0, 0);\n```\n\n可用通过style来设置控件的显示风格,如背景颜色和边框颜色等(一般情况不需要)。", - "name": "scroll_view_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": "创建slide_menu对象", - "name": "slide_menu_create", - "return": { - "type": "widget_t*", - "desc": "对象。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "slide_menu对象。" - } - ], - "annotation": { - "cast": true, - "scriptable": true - }, - "desc": "转换slide_menu对象(供脚本语言使用)。", - "name": "slide_menu_cast", - "return": { - "type": "widget_t*", - "desc": "slide_menu对象。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "slide_menu对象。" - }, - { - "type": "uint32_t", - "name": "value", - "desc": "当前项的索引。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置当前项。", - "name": "slide_menu_set_value", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "slide_menu对象。" - }, - { - "type": "align_v_t", - "name": "align_v", - "desc": "对齐方式。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置垂直对齐方式。", - "name": "slide_menu_set_align_v", - "return": { - "type": "ret_t", - "desc": "返回RET_OK表示成功,否则表示失败。" - } - }, - { - "params": [ - { - "type": "widget_t*", - "name": "widget", - "desc": "slide_menu对象。" - }, - { - "type": "float_t", - "name": "min_scale", - "desc": "最小缩放比例,范围[0.5-1]。" - } - ], - "annotation": { - "scriptable": true - }, - "desc": "设置最小缩放比例。", - "name": "slide_menu_set_min_scale", - "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": "int32_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "align_v", - "desc": "垂直对齐方式。", - "type": "align_v_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - }, - { - "name": "min_scale", - "desc": "最小缩放比例。", - "type": "float_t", - "annotation": { - "set_prop": true, - "get_prop": true, - "readable": true, - "persitent": true, - "design": true, - "scriptable": true - } - } - ], - "header": "slide_menu/slide_menu.h", - "desc": "左右滑动菜单控件。\n\n一般用一组按钮作为子控件,通过左右滑动改变当前的项。除了当菜单使用外,也可以用来切换页面。\n\nslide\\_menu\\_t是[widget\\_t](widget_t.md)的子类控件,widget\\_t的函数均适用于slide\\_menu\\_t控件。\n\n在xml中使用\"slide\\_menu\"标签创建左右滑动菜单控件。如:\n\n```xml\n\n